DM-285: add description to Component Endpoint
* also remove field value from EntityReference
This commit is contained in:
parent
f6b3df9c8f
commit
1f9a0e6326
@ -1,16 +1,11 @@
|
|||||||
package com.iqser.red.service.persistence.service.v2.api.external.model;
|
package com.iqser.red.service.persistence.service.v2.api.external.model;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.NonNull;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@ -24,8 +19,6 @@ public class EntityReference {
|
|||||||
|
|
||||||
@JacksonXmlCData
|
@JacksonXmlCData
|
||||||
private String entityRuleId;
|
private String entityRuleId;
|
||||||
@JacksonXmlCData
|
|
||||||
private String value;
|
|
||||||
|
|
||||||
private Integer page;
|
private Integer page;
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
package com.iqser.red.service.persistence.service.v2.api.external.resource;
|
package com.iqser.red.service.persistence.service.v2.api.external.resource;
|
||||||
|
|
||||||
import com.iqser.red.service.persistence.service.v2.api.external.model.FileComponents;
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierResource.DOSSIER_ID_PARAM;
|
||||||
import com.iqser.red.service.persistence.service.v2.api.external.model.FileComponentsList;
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierResource.DOSSIER_ID_PATH_PARAM;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierResource.DOSSIER_PATH;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierTemplateResource.DOSSIER_TEMPLATE_ID_PARAM;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierTemplateResource.DOSSIER_TEMPLATE_ID_PATH_VARIABLE;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierTemplateResource.DOSSIER_TEMPLATE_PATH;
|
||||||
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.FileResource.FILE_ID_PARAM;
|
||||||
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.FileResource.FILE_ID_PATH_VARIABLE;
|
||||||
|
import static com.iqser.red.service.persistence.service.v2.api.external.resource.FileResource.FILE_PATH;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -13,9 +17,13 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
|
|
||||||
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierResource.*;
|
import com.iqser.red.service.persistence.service.v2.api.external.model.FileComponents;
|
||||||
import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierTemplateResource.*;
|
import com.iqser.red.service.persistence.service.v2.api.external.model.FileComponentsList;
|
||||||
import static com.iqser.red.service.persistence.service.v2.api.external.resource.FileResource.*;
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
|
|
||||||
@ApiResponses(value = {@ApiResponse(responseCode = "429", description = "Too many requests.")})
|
@ApiResponses(value = {@ApiResponse(responseCode = "429", description = "Too many requests.")})
|
||||||
@ResponseStatus(value = HttpStatus.OK)
|
@ResponseStatus(value = HttpStatus.OK)
|
||||||
@ -29,6 +37,13 @@ public interface ComponentResource {
|
|||||||
|
|
||||||
String INCLUDE_DETAILS_PARAM = "includeDetails";
|
String INCLUDE_DETAILS_PARAM = "includeDetails";
|
||||||
|
|
||||||
|
String INCLUDE_DETAILS_DESCRIPTION = """
|
||||||
|
A toggle to decide whether to include detailed component information in the response:
|
||||||
|
|
||||||
|
- true: The component object's field componentDetails stores detailed information about the source of its respective value(s).
|
||||||
|
- false (default): The component object does not contain a field componentDetails.
|
||||||
|
""";
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(value = PATH + FILE_ID_PATH_VARIABLE + COMPONENTS_PATH, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE})
|
@GetMapping(value = PATH + FILE_ID_PATH_VARIABLE + COMPONENTS_PATH, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE})
|
||||||
@Operation(summary = "Returns the components for a file", description = "None")
|
@Operation(summary = "Returns the components for a file", description = "None")
|
||||||
@ -36,7 +51,7 @@ public interface ComponentResource {
|
|||||||
FileComponents getComponents(@Parameter(name = DOSSIER_TEMPLATE_ID_PARAM, description = "The identifier of the dossier template that is used for the dossier.", required = true) @PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId,
|
FileComponents getComponents(@Parameter(name = DOSSIER_TEMPLATE_ID_PARAM, description = "The identifier of the dossier template that is used for the dossier.", required = true) @PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId,
|
||||||
@Parameter(name = DOSSIER_ID_PARAM, description = "The identifier of the dossier that contains the file.", required = true) @PathVariable(DOSSIER_ID_PARAM) String dossierId,
|
@Parameter(name = DOSSIER_ID_PARAM, description = "The identifier of the dossier that contains the file.", required = true) @PathVariable(DOSSIER_ID_PARAM) String dossierId,
|
||||||
@Parameter(name = FILE_ID_PARAM, description = "The identifier of the file that the components are requested for.", required = true) @PathVariable(FILE_ID_PARAM) String fileId,
|
@Parameter(name = FILE_ID_PARAM, description = "The identifier of the file that the components are requested for.", required = true) @PathVariable(FILE_ID_PARAM) String fileId,
|
||||||
@Parameter(name = INCLUDE_DETAILS_PARAM, description = "TODO") @RequestParam(name = INCLUDE_DETAILS_PARAM, defaultValue = "false", required = false) boolean includeDetails);
|
@Parameter(name = INCLUDE_DETAILS_PARAM, description = INCLUDE_DETAILS_DESCRIPTION) @RequestParam(name = INCLUDE_DETAILS_PARAM, defaultValue = "false", required = false) boolean includeDetails);
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(value = PATH + BULK_COMPONENTS_PATH, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE})
|
@GetMapping(value = PATH + BULK_COMPONENTS_PATH, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE})
|
||||||
@ -44,7 +59,6 @@ public interface ComponentResource {
|
|||||||
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK")})
|
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK")})
|
||||||
FileComponentsList getComponentsOfDossier(@Parameter(name = DOSSIER_TEMPLATE_ID_PARAM, description = "The identifier of the dossier template that is used for the dossier.", required = true) @PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId,
|
FileComponentsList getComponentsOfDossier(@Parameter(name = DOSSIER_TEMPLATE_ID_PARAM, description = "The identifier of the dossier template that is used for the dossier.", required = true) @PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId,
|
||||||
@Parameter(name = DOSSIER_ID_PARAM, description = "The identifier of the dossier that contains the file.", required = true) @PathVariable(DOSSIER_ID_PARAM) String dossierId,
|
@Parameter(name = DOSSIER_ID_PARAM, description = "The identifier of the dossier that contains the file.", required = true) @PathVariable(DOSSIER_ID_PARAM) String dossierId,
|
||||||
@Parameter(name = INCLUDE_DETAILS_PARAM, description = "TODO") @RequestParam(name = INCLUDE_DETAILS_PARAM, defaultValue = "false", required = false) boolean includeDetails);
|
@Parameter(name = INCLUDE_DETAILS_PARAM, description = INCLUDE_DETAILS_DESCRIPTION) @RequestParam(name = INCLUDE_DETAILS_PARAM, defaultValue = "false", required = false) boolean includeDetails);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user