Skip to content

Commit

Permalink
[#82] Update api response documentation for ComponentController.addFa…
Browse files Browse the repository at this point in the history
…ilureMode
  • Loading branch information
kostobog committed Sep 12, 2024
1 parent ad9e67c commit ea45c29
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ public Set<FailureMode> getFailureModes(@PathVariable(name = "componentFragment"
@Operation(summary = "Add new failure mode to a component")
@ApiResponses(value = {
@ApiResponse(responseCode = "201", description = "Failure mode added"),
@ApiResponse(responseCode = "404", description = "Component not found")
@ApiResponse(responseCode = "400", description = """
Invalid Invalid failureMode, e.g.
- The uri should be null or unique
- Duplicate entity name
- Name must not be empty
"""),
@ApiResponse(responseCode = "404", description = "Component identified by <.../componentFragment> not found.")
})
@ResponseStatus(HttpStatus.CREATED)
@PostMapping(value = "/{componentFragment}/failureModes", produces = {JsonLd.MEDIA_TYPE, MediaType.APPLICATION_JSON_VALUE}, consumes = {MediaType.APPLICATION_JSON_VALUE, JsonLd.MEDIA_TYPE})
Expand Down

0 comments on commit ea45c29

Please sign in to comment.