Skip to content

Commit

Permalink
MultipartInput removed from swagger.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
brig committed Nov 8, 2023
1 parent 6b9349c commit 92def59
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
3 changes: 3 additions & 0 deletions client2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@
<item>
<code>java.class.nonPublicPartOfAPI</code>
</item>
<item>
<code>java.class.removed</code>
</item>
</revapi.ignore>
</analysisConfiguration>
</configuration>
Expand Down
1 change: 0 additions & 1 deletion server/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<configuration>
<!-- <openapi31>true</openapi31>-->
<outputFileName>swagger</outputFileName>
<outputPath>${project.build.directory}/classes/com/walmartlabs/concord/server/swagger</outputPath>
<outputFormat>YAML</outputFormat>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.walmartlabs.concord.server.user.UserManager;
import com.walmartlabs.concord.server.user.UserType;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.headers.Header;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down Expand Up @@ -102,7 +103,7 @@ public SecretResource(OrganizationManager orgManager,
@Validate
@Operation(description = "Create secret", operationId = "createSecret")
public SecretOperationResponse create(@PathParam("orgName") @ConcordKey String orgName,
@RequestBody(content = @Content(schema = @Schema(type = "object"))) MultipartInput input) {
@Parameter(schema = @Schema(type = "object", implementation = Object.class)) MultipartInput input) {

OrganizationEntry org = orgManager.assertAccess(orgName, true);

Expand Down Expand Up @@ -203,8 +204,7 @@ public SecretEntry get(@PathParam("orgName") @ConcordKey String orgName,
)
public Response getData(@PathParam("orgName") @ConcordKey String orgName,
@PathParam("secretName") @ConcordKey String secretName,
@RequestBody(content = @Content(schema = @Schema(type = "object", implementation = GetDataRequest.class)))
MultipartInput input) {
@Parameter(schema = @Schema(type = "object", implementation = GetDataRequest.class)) MultipartInput input) {

GetDataRequest request = GetDataRequest.from(input);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public List<SecretEntryV2> list(@PathParam("orgName") @ConcordKey String orgName
@Operation(description = "Updates an existing secret", operationId = "updateSecret")
public GenericOperationResult update(@PathParam("orgName") @ConcordKey String orgName,
@PathParam("secretName") @ConcordKey String secretName,
@RequestBody(content = @Content(schema = @Schema(type = "object"))) MultipartInput input) {
@Parameter(schema = @Schema(type = "object", implementation = Object.class)) MultipartInput input) {

OrganizationEntry org = orgManager.assertAccess(orgName, true);
Set<UUID> projectIds = getProjectIds(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ public StartProcessResponse start(@PathParam("entryPoint") String entryPoint,
@Produces(MediaType.APPLICATION_JSON)
@WithTimer
@Operation(description = "Start new process", operationId = "startProcess")
public StartProcessResponse start(@RequestBody(content = @Content(schema = @Schema(type = "object")))
MultipartInput input,
public StartProcessResponse start(@Parameter(schema = @Schema(type = "object", implementation = Object.class)) MultipartInput input,
@Parameter(hidden = true) @Deprecated @QueryParam("parentId") UUID parentInstanceId,
@Parameter(hidden = true) @Deprecated @DefaultValue("false") @QueryParam("sync") boolean sync,
@Parameter(hidden = true) @Deprecated @QueryParam("out") String[] out,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.extensions.ExtensionProperty;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonatype.siesta.Resource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.walmartlabs.concord.server.sdk.ProcessKey;
import com.walmartlabs.concord.server.sdk.metrics.WithTimer;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
Expand Down Expand Up @@ -116,8 +117,7 @@ public ResumeProcessResponse restore(@PathParam("id") UUID instanceId,
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Operation(description = "Upload checkpoint")
public void uploadCheckpoint(@PathParam("id") UUID instanceId,
@RequestBody(content = @Content(schema = @Schema(type = "object")))
MultipartInput input) {
@Parameter(schema = @Schema(type = "object", implementation = Object.class)) MultipartInput input) {

// TODO replace with ProcessKeyCache
ProcessEntry entry = processManager.assertProcess(instanceId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.walmartlabs.concord.server.process.state.ProcessStateManager;
import com.walmartlabs.concord.server.sdk.PartialProcessKey;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
Expand Down Expand Up @@ -119,7 +120,7 @@ public FormSubmitResponse submit(@PathParam("processInstanceId") UUID processIns
@Operation(description = "Submit JSON form data", operationId = "submitFormAsMultipart")
public FormSubmitResponse submit(@PathParam("processInstanceId") UUID processInstanceId,
@PathParam("formName") String formName,
@RequestBody(content = @Content(schema = @Schema(type = "object"))) MultipartInput data) {
@Parameter(schema = @Schema(type = "object", implementation = Object.class)) MultipartInput data) {

if (isV2(processInstanceId)) {
return formResourceV2.submit(processInstanceId, formName, data);
Expand Down

0 comments on commit 92def59

Please sign in to comment.