diff --git a/src/main/java/org/openepics/names/rest/api/v1/INames.java b/src/main/java/org/openepics/names/rest/api/v1/INames.java index 70f80fc723276e75e60ee360f979c0b9df5e785f..2dc46bc128733627198af6684ca6cb5999595734 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/INames.java +++ b/src/main/java/org/openepics/names/rest/api/v1/INames.java @@ -123,16 +123,16 @@ public interface INames { public static final String DEFAULT_PAGE_SIZE = "100"; /** - * Create names by list of name elements. + * Create names by list of name element commands. * Return list of name elements for created names. * - * @param nameElements list of name elements + * @param nameElements list of name element commands * @return list of created name elements */ @Operation( - summary = "Create names by array of name elements", + summary = "Create names by array of name element commands", description = """ - Create names by array of name elements. + Create names by array of name element commands. Return array of name elements for created names. Required attributes: @@ -179,7 +179,7 @@ public interface INames { public ResponseEntity<List<NameElement>> createNames( @Parameter( in = ParameterIn.DEFAULT, - description = "array of name elements", + description = "array of name element commands", required = true, content = @Content( mediaType = "application/json", @@ -247,7 +247,7 @@ public interface INames { public ResponseEntity<Resource> createNames( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with name elements", + description = "Excel file with name element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); @@ -647,8 +647,10 @@ public interface INames { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if name exists, false otherwise. " - + "Message and details are available if no response is available.", + description = """ + OK. Response is true if name exists, false otherwise. + Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBoolean.class))), @@ -705,8 +707,10 @@ public interface INames { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if name is legacy name, false otherwise. " - + "Message and details are available if no response is available.", + description = """ + OK. Response is true if name is legacy name, false otherwise. + Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBoolean.class))), @@ -763,8 +767,10 @@ public interface INames { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if name is valid to create, false otherwise. " - + "Message and details are available if no response is available.", + description = """ + OK. Response is true if name is valid to create, false otherwise. + Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBoolean.class))), @@ -796,22 +802,22 @@ public interface INames { // ---------------------------------------------------------------------------------------------------- /** - * Return if names are valid to create by list of name elements. + * Return if names are valid to create by list of name element commands. * If names are valid to create, successful create of names can be expected. * * <p> - * Response is true if all name elements validated ok, false otherwise, responses contain array - * with result for each name element. Message and details are available if no response is available. + * Response is true if all name element commands validated ok, false otherwise, responses contain array + * with result for each name element command. Message and details are available if no response is available. * </p> * - * @param nameElements list of name elements + * @param nameElements list of name element commands * @return if list of names is valid to create */ @Hidden @Operation( - summary = "Return if names are valid to create by list of name elements", + summary = "Return if names are valid to create by list of name element commands", description = """ - Return if names are valid to create by list of name elements. + Return if names are valid to create by list of name element commands. If names are valid to create, successful create of names can be expected. Required attributes: @@ -829,8 +835,10 @@ public interface INames { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all name elements validated ok, false otherwise." - + "Responses contain array with result for each name element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all name element commands validated ok, false otherwise. + Responses contain array with result for each name element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -860,7 +868,7 @@ public interface INames { public ResponseEntity<ResponseBooleanList> validateNamesCreate( @Parameter( in = ParameterIn.DEFAULT, - description = "array of name elements", + description = "array of name element commands", required = true, content = @Content( mediaType = "application/json", @@ -871,15 +879,15 @@ public interface INames { @RequestBody List<NameElementCommand> nameElements); /** - * Return if names are valid to update by list of name elements. + * Return if names are valid to update by list of name element commands. * If names are valid to update, successful update of names can be expected. * * <p> - * Response is true if all name elements validated ok, false otherwise, responses contain array - * with result for each name element. Message and details are available if no response is available. + * Response is true if all name element commands validated ok, false otherwise, responses contain array + * with result for each name element command. Message and details are available if no response is available. * </p> * - * @param nameElements list of name elements + * @param nameElements list of name element commands * @return if list of name elements is valid to update */ @Hidden @@ -903,8 +911,10 @@ public interface INames { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all name elements validated ok, false otherwise." - + "Responses contain array with result for each name element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all name element commands validated ok, false otherwise. + Responses contain array with result for each name element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -934,7 +944,7 @@ public interface INames { public ResponseEntity<ResponseBooleanList> validateNamesUpdate( @Parameter( in = ParameterIn.DEFAULT, - description = "array of name elements", + description = "array of name element commands", required = true, content = @Content( mediaType = "application/json", @@ -945,22 +955,22 @@ public interface INames { @RequestBody List<NameElementCommand> nameElements); /** - * Return if names are valid to delete by list of name elements. + * Return if names are valid to delete by list of name element commands. * If names are valid to delete, successful delete of names can be expected. * * <p> - * Response is true if all name elements validated ok, false otherwise, responses contain array - * with result for each name element. Message and details are available if no response is available. + * Response is true if all name element commands validated ok, false otherwise, responses contain array + * with result for each name element command. Message and details are available if no response is available. * </p> * - * @param nameElements list of name elements + * @param nameElements list of name element commands * @return if list of name elements is valid to delete */ @Hidden @Operation( - summary = "Return if names are valid to delete by list of name elements", + summary = "Return if names are valid to delete by list of name element commands", description = """ - Return if names are valid to delete by list of name elements. + Return if names are valid to delete by list of name element commands. If names are valid to delete, successful delete of names can be expected. Required attributes: @@ -973,8 +983,10 @@ public interface INames { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all name elements validated ok, false otherwise." - + "Responses contain array with result for each name element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all name element commands validated ok, false otherwise. + Responses contain array with result for each name element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -1004,7 +1016,7 @@ public interface INames { public ResponseEntity<ResponseBooleanList> validateNamesDelete( @Parameter( in = ParameterIn.DEFAULT, - description = "array of name elements", + description = "array of name element commands", required = true, content = @Content( mediaType = "application/json", @@ -1017,16 +1029,16 @@ public interface INames { // ---------------------------------------------------------------------------------------------------- /** - * Update names by list of name elements. + * Update names by list of name element commands. * Return list of name elements for updated names. * - * @param nameElements list of name elements + * @param nameElements list of name element commands * @return list of name elements for updated names */ @Operation( - summary = "Update names by array of name elements", + summary = "Update names by array of name element commands", description = """ - Update names by array of name elements. + Update names by array of name element commands. Return array of name elements for updated names. Required attributes: @@ -1072,7 +1084,7 @@ public interface INames { public List<NameElement> updateNames( @Parameter( in = ParameterIn.DEFAULT, - description = "array of name elements", + description = "array of name element commands", required = true, content = @Content( mediaType = "application/json", @@ -1139,7 +1151,7 @@ public interface INames { public ResponseEntity<Resource> updateNames( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with name elements", + description = "Excel file with name element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); @@ -1147,16 +1159,16 @@ public interface INames { // ---------------------------------------------------------------------------------------------------- /** - * Delete names by list of name elements. + * Delete names by list of name element commands. * Return list of name elements for deleted names. * - * @param nameElements list of name elements + * @param nameElements list of name element commands * @return list of name elements for deleted names */ @Operation( - summary = "Delete names by array of name elements", + summary = "Delete names by array of name element commands", description = """ - Delete names by array of name elements. + Delete names by array of name element commands. Return array of name elements for deleted names. Required attributes: @@ -1198,7 +1210,7 @@ public interface INames { public List<NameElement> deleteNames( @Parameter( in = ParameterIn.DEFAULT, - description = "array of name elements", + description = "array of name element commands", required = true, content = @Content( mediaType = "application/json", @@ -1261,7 +1273,7 @@ public interface INames { public ResponseEntity<Resource> deleteNames( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with name elements", + description = "Excel file with name element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); diff --git a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java index ff7ee6a0ff73ebe17119c5a87fe740ca84d299db..7c5efab2beb16df226b76a7bb967048f112d998b 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java +++ b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java @@ -138,16 +138,16 @@ public interface IStructures { public static final String DEFAULT_PAGE_SIZE = "100"; /** - * Create (propose) structures by list of structure elements. + * Create (propose) structures by list of structure element commands. * Return list of structure elements for created structures (proposals). * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return list of structure elements for created structures (proposals) */ @Operation( - summary = "Create (propose) structures by array of structure elements", + summary = "Create (propose) structures by array of structure element commands", description = """ - Create (propose) structures by array of structure elements. + Create (propose) structures by array of structure element commands. Return array of structure elements for created structures (proposals). Required attributes: @@ -199,7 +199,7 @@ public interface IStructures { public ResponseEntity<List<StructureElement>> createStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -272,7 +272,7 @@ public interface IStructures { public ResponseEntity<Resource> createStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with structure elements", + description = "Excel file with structure element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); @@ -693,8 +693,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if mnemonic path exists, false otherwise. " - + "Message and details are available if no response is available.", + description = """ + OK. Response is true if mnemonic path exists, false otherwise. + Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBoolean.class))), @@ -753,8 +755,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if structure is valid to create, false otherwise. " - + "Message and details are available if no response is available.", + description = """ + OK. Response is true if structure is valid to create, false otherwise. + Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBoolean.class))), @@ -793,27 +797,28 @@ public interface IStructures { // ---------------------------------------------------------------------------------------------------- /** - * Return if structures are valid to create (propose) by list of structure elements. + * Return if structures are valid to create (propose) by list of structure element commands. * If structures are valid to create, successful create of structures can be expected. * * <p> - * Returned object has four fields (message, details, response, responses). + * Returned object has five fields (message, details, field, value, list). * <ul> * <li>message: reason, if method fails</li> * <li>details: details, if method fails</li> - * <li>response: boolean (true/false), overall result of method</li> - * <li>responses: list of response objects (with fields reason, details, response), one for each input element</li> + * <li>field: field, if method fails</li> + * <li>value: boolean (true/false), overall result of method</li> + * <li>list: list of response objects (with fields reason, details, field, value), one for each input element</li> * </ul> * </p> * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return if list of structures is valid to create (propose) */ @Hidden @Operation( - summary = "Return if structures are valid to create (propose) by list of structure elements", + summary = "Return if structures are valid to create (propose) by list of structure element commands", description = """ - Return if structures are valid to create (propose) by list of structure elements. + Return if structures are valid to create (propose) by list of structure element commands. If structures are valid to create, successful create of structures can be expected. Required attributes: @@ -828,8 +833,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all structure elements validated ok, false otherwise. " - + "Responses contain array with result for each structure element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all structure element commands validated ok, false otherwise. + Responses contain array with result for each structure element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -865,7 +872,7 @@ public interface IStructures { public ResponseEntity<ResponseBooleanList> validateStructuresCreate( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -876,27 +883,28 @@ public interface IStructures { @RequestBody List<StructureElementCommand> structureElements); /** - * Return if structures are valid to update (propose) by list of structure elements. + * Return if structures are valid to update (propose) by list of structure element commands. * If structures are valid to update, successful update of structures can be expected. * * <p> - * Returned object has four fields (message, details, response, responses). + * Returned object has five fields (message, details, field, value, list). * <ul> * <li>message: reason, if method fails</li> * <li>details: details, if method fails</li> - * <li>response: boolean (true/false), overall result of method</li> - * <li>responses: list of response objects (with fields reason, details, response), one for each input element</li> + * <li>field: field, if method fails</li> + * <li>value: boolean (true/false), overall result of method</li> + * <li>list: list of response objects (with fields reason, details, field, value), one for each input element</li> * </ul> * </p> * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return if list of structures is valid to update (propose) */ @Hidden @Operation( - summary = "Return if structures are valid to update (propose) by list of structure elements", + summary = "Return if structures are valid to update (propose) by list of structure element commands", description = """ - Return if structures are valid to update (propose) by list of structure elements. + Return if structures are valid to update (propose) by list of structure element commands. If structures are valid to update, successful update of structures can be expected. Required attributes: @@ -912,8 +920,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all structure elements validated ok, false otherwise. " - + "Responses contain array with result for each structure element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all structure element commands validated ok, false otherwise. + Responses contain array with result for each structure element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -949,7 +959,7 @@ public interface IStructures { public ResponseEntity<ResponseBooleanList> validateStructuresUpdate( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -960,27 +970,28 @@ public interface IStructures { @RequestBody List<StructureElementCommand> structureElements); /** - * Return if structures are valid to delete (propose) by list of structure elements. + * Return if structures are valid to delete (propose) by list of structure element commands. * If structures are valid to delete, successful delete of structures can be expected. * * <p> - * Returned object has four fields (message, details, response, responses). + * Returned object has five fields (message, details, field, value, list). * <ul> * <li>message: reason, if method fails</li> * <li>details: details, if method fails</li> - * <li>response: boolean (true/false), overall result of method</li> - * <li>responses: list of response objects (with fields reason, details, response), one for each input element</li> + * <li>field: field, if method fails</li> + * <li>value: boolean (true/false), overall result of method</li> + * <li>list: list of response objects (with fields reason, details, field, value), one for each input element</li> * </ul> * </p> * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return if list of structures is valid to delete (propose) */ @Hidden @Operation( - summary = "Return if structures are valid to delete (propose) by list of structure elements", + summary = "Return if structures are valid to delete (propose) by list of structure element commands", description = """ - Return if structures are valid to delete (propose) by list of structure elements. + Return if structures are valid to delete (propose) by list of structure element commands. If structures are valid to delete, successful delete of structures can be expected. Required attributes: @@ -992,8 +1003,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all structure elements validated ok, false otherwise. " - + "Responses contain array with result for each structure element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all structure element commands validated ok, false otherwise. + Responses contain array with result for each structure element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -1029,7 +1042,7 @@ public interface IStructures { public ResponseEntity<ResponseBooleanList> validateStructuresDelete( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1040,27 +1053,28 @@ public interface IStructures { @RequestBody List<StructureElementCommand> structureElements); /** - * Return if structures are valid to approve by list of structure elements. + * Return if structures are valid to approve by list of structure element commands. * If structures are valid to approve, successful approve of structures can be expected. * * <p> - * Returned object has four fields (message, details, response, responses). + * Returned object has five fields (message, details, field, value, list). * <ul> * <li>message: reason, if method fails</li> * <li>details: details, if method fails</li> - * <li>response: boolean (true/false), overall result of method</li> - * <li>responses: list of response objects (with fields reason, details, response), one for each input element</li> + * <li>field: field, if method fails</li> + * <li>value: boolean (true/false), overall result of method</li> + * <li>list: list of response objects (with fields reason, details, field, value), one for each input element</li> * </ul> * </p> * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return if list of structures is valid to approve */ @Hidden @Operation( - summary = "Return if structures are valid to approve by list of structure elements", + summary = "Return if structures are valid to approve by list of structure element commands", description = """ - Return if structures are valid to approve by list of structure elements. + Return if structures are valid to approve by list of structure element commands. If structures are valid to approve, successful approve of structures can be expected. Required attributes: @@ -1076,8 +1090,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all structure elements validated ok, false otherwise. " - + "Responses contain array with result for each structure element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all structure element commands validated ok, false otherwise. + Responses contain array with result for each structure element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -1113,7 +1129,7 @@ public interface IStructures { public ResponseEntity<ResponseBooleanList> validateStructuresApprove( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1124,27 +1140,28 @@ public interface IStructures { @RequestBody List<StructureElementCommand> structureElements); /** - * Return if structures are valid to cancel by list of structure elements. + * Return if structures are valid to cancel by list of structure element commands. * If structures are valid to cancel, successful cancel of structures can be expected. * * <p> - * Returned object has four fields (message, details, response, responses). + * Returned object has five fields (message, details, field, value, list). * <ul> * <li>message: reason, if method fails</li> * <li>details: details, if method fails</li> - * <li>response: boolean (true/false), overall result of method</li> - * <li>responses: list of response objects (with fields reason, details, response), one for each input element</li> + * <li>field: field, if method fails</li> + * <li>value: boolean (true/false), overall result of method</li> + * <li>list: list of response objects (with fields reason, details, field, value), one for each input element</li> * </ul> * </p> * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return if list of structures is valid to cancel */ @Hidden @Operation( - summary = "Return if structures are valid to cancel by list of structure elements", + summary = "Return if structures are valid to cancel by list of structure element commands", description = """ - Return if structures are valid to cancel by list of structure elements. + Return if structures are valid to cancel by list of structure element commands. If structures are valid to cancel, successful cancel of structures can be expected. Required attributes: @@ -1160,8 +1177,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all structure elements validated ok, false otherwise. " - + "Responses contain array with result for each structure element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all structure element commands validated ok, false otherwise. + Responses contain array with result for each structure element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -1197,7 +1216,7 @@ public interface IStructures { public ResponseEntity<ResponseBooleanList> validateStructuresCancel( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1208,27 +1227,28 @@ public interface IStructures { @RequestBody List<StructureElementCommand> structureElements); /** - * Return if structures are valid to reject by list of structure elements. + * Return if structures are valid to reject by list of structure element commands. * If structures are valid to reject, successful reject of structures can be expected. * * <p> - * Returned object has four fields (message, details, response, responses). + * Returned object has five fields (message, details, field, value, list). * <ul> * <li>message: reason, if method fails</li> * <li>details: details, if method fails</li> - * <li>response: boolean (true/false), overall result of method</li> - * <li>responses: list of response objects (with fields reason, details, response), one for each input element</li> + * <li>field: field, if method fails</li> + * <li>value: boolean (true/false), overall result of method</li> + * <li>list: list of response objects (with fields reason, details, field, value), one for each input element</li> * </ul> * </p> * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return if list of structures is valid to reject */ @Hidden @Operation( - summary = "Return if structures are valid to reject by list of structure elements", + summary = "Return if structures are valid to reject by list of structure element commands", description = """ - Return if structures are valid to reject by list of structure elements. + Return if structures are valid to reject by list of structure element commands. If structures are valid to reject, successful reject of structures can be expected. Required attributes: @@ -1244,8 +1264,10 @@ public interface IStructures { @ApiResponses(value = { @ApiResponse( responseCode = "200", - description = "OK. Response is true if all structure elements validated ok, false otherwise. " - + "Responses contain array with result for each structure element. Message and details are available if no response is available.", + description = """ + OK. Response is true if all structure element commands validated ok, false otherwise. + Responses contain array with result for each structure element command. Message and details are available if no response is available. + """, content = @Content( mediaType = "application/json", schema = @Schema(implementation = ResponseBooleanList.class))), @@ -1281,7 +1303,7 @@ public interface IStructures { public ResponseEntity<ResponseBooleanList> validateStructuresReject( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1294,16 +1316,16 @@ public interface IStructures { // ---------------------------------------------------------------------------------------------------- /** - * Update (propose) structures by list of structure elements. + * Update (propose) structures by list of structure element commands. * Return list of structure elements for updated structures (proposals). * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return list of structure elements for updated structures (proposals) */ @Operation( - summary = "Update (propose) structures by array of structure elements", + summary = "Update (propose) structures by array of structure element commands", description = """ - Update (propose) structures by array of structure elements. + Update (propose) structures by array of structure element commands. Return array of structure elements for updated structures (proposals). Required attributes: @@ -1354,7 +1376,7 @@ public interface IStructures { public List<StructureElement> updateStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1426,7 +1448,7 @@ public interface IStructures { public ResponseEntity<Resource> updateStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with structure elements", + description = "Excel file with structure element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); @@ -1434,16 +1456,16 @@ public interface IStructures { // ---------------------------------------------------------------------------------------------------- /** - * Delete (propose) structures by list of structure elements. + * Delete (propose) structures by list of structure element commands. * Return list of structure elements for deleted structures (proposals). * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return list of structure elements for deleted structures (proposals) */ @Operation( - summary = "Delete (propose) structures by array of structure elements", + summary = "Delete (propose) structures by array of structure element commands", description = """ - Delete (propose) structures by array of structure elements. + Delete (propose) structures by array of structure element commands. Return array of structure elements for deleted structures (proposals). Required attributes: @@ -1492,7 +1514,7 @@ public interface IStructures { public List<StructureElement> deleteStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1562,27 +1584,27 @@ public interface IStructures { public ResponseEntity<Resource> deleteStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with structure elements", + description = "Excel file with structure element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); // ---------------------------------------------------------------------------------------------------- /** - * Approve structures (proposals) by list of structure elements. + * Approve structures (proposals) by list of structure element commands. * Return list of structure elements for approved structures. * * <p> * Name is automatically created name when creation of system structure is approved. * </p> * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return list of structure elements for approved structures */ @Operation( - summary = "Approve structures (proposals) by array of structure elements", + summary = "Approve structures (proposals) by array of structure element commands", description = """ - Approve structures (proposals) by array of structure elements. + Approve structures (proposals) by array of structure element commands. Return array of structure elements for approved structures. Name is automatically created name when creation of system structure is approved. @@ -1636,7 +1658,7 @@ public interface IStructures { public List<StructureElement> approveStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1714,22 +1736,22 @@ public interface IStructures { public ResponseEntity<Resource> approveStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with structure elements", + description = "Excel file with structure element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); /** - * Cancel structures (proposals) by list of structure elements. + * Cancel structures (proposals) by list of structure element commands. * Return list of cancelled structure elements. * * @param structureElements list of structure elements * @return list of structure elements for cancelled structures */ @Operation( - summary = "Cancel structures (proposals) by array of structure elements", + summary = "Cancel structures (proposals) by array of structure element commands", description = """ - Cancel structures (proposals) by array of structure elements. + Cancel structures (proposals) by array of structure element commands. Return array of structure elements for cancelled structures. Required attributes: @@ -1781,7 +1803,7 @@ public interface IStructures { public List<StructureElement> cancelStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1853,22 +1875,22 @@ public interface IStructures { public ResponseEntity<Resource> cancelStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with structure elements", + description = "Excel file with structure element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); /** - * Reject structures (proposals) by list of structure elements. + * Reject structures (proposals) by list of structure element commands. * Return list of rejected structure elements. * - * @param structureElements list of structure elements + * @param structureElements list of structure element commands * @return list of structure elements for rejected structures */ @Operation( - summary = "Reject structures (proposals) by array of structure elements", + summary = "Reject structures (proposals) by array of structure element commands", description = """ - Reject structures (proposals) by array of structure elements. + Reject structures (proposals) by array of structure element commands. Return array of structure elements for rejected structures. Required attributes: @@ -1920,7 +1942,7 @@ public interface IStructures { public List<StructureElement> rejectStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "array of structure elements", + description = "array of structure element commands", required = true, content = @Content( mediaType = "application/json", @@ -1992,7 +2014,7 @@ public interface IStructures { public ResponseEntity<Resource> rejectStructures( @Parameter( in = ParameterIn.DEFAULT, - description = "Excel file with structure elements", + description = "Excel file with structure element commands", required = true, content = @Content(mediaType = ExcelUtil.MIME_TYPE_OPENXML_SPREADSHEET)) @RequestParam("file") MultipartFile file); diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElement.java b/src/main/java/org/openepics/names/rest/beans/element/NameElement.java index f0e1378df9e798925403a92ee3efc3d3eb1471f6..ce04ff512f14833682fbe78da1c625549e97352c 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElement.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElement.java @@ -32,8 +32,10 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a name. " - + "It used to show information for a name.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a name. + It is used to show information for a name. + """) public class NameElement extends NameElementCommand implements Serializable { /** diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java index 2f21e63d3d394b5b8d4dc6e0bf938d57aa1dd184..ece8e29f04ae5fe1e532ca398d49c785b77135c2 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java @@ -29,8 +29,10 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a command for a name " - + "from client to server. It used to create, update, delete and validate a name.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a command for a name from client to server. + It is used to create, update, delete and validate a name. + """) public class NameElementCommand implements Serializable { /** diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java index 30d5f1385e644b7565fa789a5eccdc6eed129b24..06e084c3852e483781ea52a137e043a805b51d78 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java @@ -33,8 +33,10 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a structure entry. " - + "It used to show information for a structure entry.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a structure entry. + It is used to show information for a structure entry. + """) public class StructureElement extends StructureElementCommand implements Serializable { /** diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java index 13b7ad80e5df7c913d89e7d18c59b2a6a0e682c4..e3e9bb11c7aba2d9e480b54f562dca2a79ab897a 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java @@ -31,9 +31,10 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a command for a structure entry " - + "from client to server. It used to create, update, delete and validate " - + "and approve, cancel, reject a structure entry.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a command for a structure entry from client to server. + It is used to create, update, delete and validate and approve, cancel, reject a structure entry. + """) public class StructureElementCommand implements Serializable { /** diff --git a/src/main/java/org/openepics/names/rest/beans/response/Response.java b/src/main/java/org/openepics/names/rest/beans/response/Response.java index 37abeffc45c75661d7d7c31f94ec9322d3f4b245..5a2f1528c612c0d94635d7ae5e4fb599ff7afdab 100644 --- a/src/main/java/org/openepics/names/rest/beans/response/Response.java +++ b/src/main/java/org/openepics/names/rest/beans/response/Response.java @@ -27,9 +27,11 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a response from server to client. " - + "It used to show information related to an operation for a name and structure entry. " - + "Values are set server-side.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a response from server to client. + It is used to show information related to an operation for a name and structure entry. + Values are set server-side. + """) public class Response { private static final String CONTENT_TYPE = "Content-Type"; diff --git a/src/main/java/org/openepics/names/rest/beans/response/ResponseBoolean.java b/src/main/java/org/openepics/names/rest/beans/response/ResponseBoolean.java index 3b6d9ad44fc0c50de1c0aafb1bb61b4e87148d93..62bc1e3df9dab87cb5876ae2aab42ebf095df0bf 100644 --- a/src/main/java/org/openepics/names/rest/beans/response/ResponseBoolean.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponseBoolean.java @@ -25,9 +25,11 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a response from server to client. " - + "It used to show information related to an operation for a name and structure entry. " - + "Values are set server-side.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a response from server to client. + It is used to show information related to an operation for a name and structure entry. + Values are set server-side. + """) public class ResponseBoolean extends Response { @Schema(description = "Outcome of the response.") diff --git a/src/main/java/org/openepics/names/rest/beans/response/ResponseBooleanList.java b/src/main/java/org/openepics/names/rest/beans/response/ResponseBooleanList.java index 6e0989c9cbf521ca89379eb7d1b795f6c20dfd08..028174b5667a1d8702704786fdda97158bcc5c0c 100644 --- a/src/main/java/org/openepics/names/rest/beans/response/ResponseBooleanList.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponseBooleanList.java @@ -29,9 +29,11 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a response from server to client. " - + "It used to show information related to an operation for a name and structure entry. " - + "Values are set server-side.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a response from server to client. + It is used to show information related to an operation for a name and structure entry. + Values are set server-side. + """) public class ResponseBooleanList extends ResponseBoolean { @Schema(description = "Items that are returned to client from server.") diff --git a/src/main/java/org/openepics/names/rest/beans/response/ResponsePage.java b/src/main/java/org/openepics/names/rest/beans/response/ResponsePage.java index 041ff73fe1bcde5f21c6e3005e0e579b82ed8d4e..d26fb0c05e4945c1b42d3bd9414087eaaa8dd159 100644 --- a/src/main/java/org/openepics/names/rest/beans/response/ResponsePage.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponsePage.java @@ -25,9 +25,11 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a response from server to client. " - + "It used to show information related to an operation for a name and structure entry. " - + "Values are set server-side.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a response from server to client. + It is used to show information related to an operation for a name and structure entry. + Values are set server-side. + """) public abstract class ResponsePage extends Response { // note diff --git a/src/main/java/org/openepics/names/rest/beans/response/ResponsePageNameElements.java b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageNameElements.java index 75e35639a86091115fa756a032fe6d5c1605f44d..7a68dff30bf59960216ba3e086642c474062ef19 100644 --- a/src/main/java/org/openepics/names/rest/beans/response/ResponsePageNameElements.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageNameElements.java @@ -31,9 +31,11 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a response from server to client. " - + "It used to show information related to an operation for a name and structure entry. " - + "Values are set server-side.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a response from server to client. + It is used to show information related to an operation for a name and structure entry. + Values are set server-side. + """) public class ResponsePageNameElements extends ResponsePage { @Schema(description = "Items (names) that are returned to client from server.") diff --git a/src/main/java/org/openepics/names/rest/beans/response/ResponsePageStructureElements.java b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageStructureElements.java index ca46f30b6fb24e4f7b7256e772a405989dfbcf1a..7cfc5bb00920a4344fec982c64637f75e8bd8645 100644 --- a/src/main/java/org/openepics/names/rest/beans/response/ResponsePageStructureElements.java +++ b/src/main/java/org/openepics/names/rest/beans/response/ResponsePageStructureElements.java @@ -31,9 +31,11 @@ import io.swagger.v3.oas.annotations.media.Schema; * * @author Lars Johansson */ -@Schema(description = "A collection of attributes that is used to encapsulate a response from server to client. " - + "It used to show information related to an operation for a name and structure entry. " - + "Values are set server-side.") +@Schema(description = """ + A collection of attributes that is used to encapsulate a response from server to client. + It is used to show information related to an operation for a name and structure entry. + Values are set server-side. + """) public class ResponsePageStructureElements extends ResponsePage { @Schema(description = "Items (structure entries) that are returned to client from server.")