Skip to content

Commit

Permalink
Specify the 202 Accepted response in RunService API
Browse files Browse the repository at this point in the history
  • Loading branch information
barreiro committed Oct 24, 2024
1 parent 23f4c78 commit bbf1036
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/site/content/en/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,10 @@ paths:
format: int32
type: integer
example: 101
"202":
description: The run data will be processed asynchronously
content:
text/plain: {}
"400":
description: Some fields are missing or invalid
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ Response add(@QueryParam("test") String testNameOrId,
"]"))
@APIResponses(value = {
@APIResponse(responseCode = "200", description = "id of the newly generated run", content = @Content(mediaType = MediaType.APPLICATION_JSON, schema = @Schema(type = SchemaType.INTEGER, implementation = Integer.class), example = "101")),
@APIResponse(responseCode = "202", description = "The run data will be processed asynchronously", content = @Content(mediaType = MediaType.TEXT_PLAIN)),
@APIResponse(responseCode = "400", description = "Some fields are missing or invalid", content = @Content(mediaType = MediaType.APPLICATION_JSON))
})
@Operation(description = "Upload a new Run")
Expand Down
1 change: 1 addition & 0 deletions horreum-web/src/domain/runs/RunImportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const RunImportModal = (props: RunImportModalProps) => {
)
, alerting, "UPLOAD_ERROR", "Failed to upload run data")
.then(noop)
.catch(noop)
.then(() => props.onClose())

}
Expand Down

0 comments on commit bbf1036

Please sign in to comment.