diff options
author | Renu Kumari <renu.kumari@bell.ca> | 2021-08-10 16:43:04 -0400 |
---|---|---|
committer | Renu Kumari <renu.kumari@bell.ca> | 2021-08-19 07:13:57 -0400 |
commit | ea04c07ad990b5543766e95e234cae746bd1fbc1 (patch) | |
tree | c50008212dbf1471e859c0f9f681baa146a57c7c /docs/api/swagger | |
parent | 25ed5a8a63e88edd0b9c8285b640839a6e93866a (diff) |
Validate controller input and provide expected response
- validate endpoint input
- set default values if it is missing in the optional fields
- used hateoas for previous and next record link generation
- use service layer in controller layer
Issue-ID: CPS-449
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I7936cd9e8e7dead3b5650b421bb12f10d14ffa9b
Diffstat (limited to 'docs/api/swagger')
-rw-r--r-- | docs/api/swagger/openapi.yml | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/docs/api/swagger/openapi.yml b/docs/api/swagger/openapi.yml index cde25a8..991d807 100644 --- a/docs/api/swagger/openapi.yml +++ b/docs/api/swagger/openapi.yml @@ -68,7 +68,7 @@ paths: nextRecordsLink: /v1/dataspace/my-dataspace/anchors/my-anchor/history?pageLimit=20&pageNumber=2 previousRecordsLink: /v1/dataspace/my-dataspace/anchors/my-anchor/history?pageLimit=20&pageNumber=0 records: - - timestamp: '2021-03-21T00:00:00.000000-0:00' + - timestamp: '2021-03-21T00:00:00.000-0000' dataspace: my-dataspace schemaSet: my-schema-set anchor: my-anchor @@ -114,7 +114,7 @@ paths: nextRecordsLink: /v1/dataspace/my-dataspace/anchors/history?pageLimit=20&pageNumber=2 previousRecordsLink: /v1/dataspace/my-dataspace/anchors/history?pageLimit=20&pageNumber=0 records: - - timestamp: '2021-03-21T00:00:00.000000-0:00' + - timestamp: '2021-03-21T00:00:00.000-0000' dataspace: my-dataspace schemaSet: my-schema-set anchor: my-anchor @@ -143,7 +143,7 @@ components: required: false schema: type: string - example: '2021-03-21T00:00:00.000000-0:00' + example: '2021-03-21T00:00:00.000-0000' simplePayloadFilter: name: simplePayloadFilter in: query @@ -158,7 +158,7 @@ components: required: false schema: type: string - example: '2021-03-21T00:00:00.000000-0:00' + example: '2021-03-21T00:00:00.000-0000' pageLimit: in: query name: pageLimit @@ -166,7 +166,6 @@ components: schema: type: integer minimum: 0 - maximum: 10000 default: 1000 description: The numbers of items to return pageNumber: @@ -185,7 +184,7 @@ components: schema: type: string default: observed_timestamp:desc - description: "Sort by timestamp in 'asc' or 'desc' order. Supported values: <br/> timestamp:desc<br/>timestamp:asc" + description: "Sort by timestamp in 'asc' or 'desc' order. Supported values: <br/>observed_timestamp:desc<br/>anchor:asc,observed_timestamp:desc" responses: BadRequest: description: Bad Request @@ -210,10 +209,9 @@ components: type: object title: AnchorDetails properties: - timestamp: + observedTimestamp: type: string - format: date-time - example: '2021-03-21T00:00:00.000000-0:00' + example: '2021-03-21T00:00:00.000-0000' dataspace: type: string example: 'my-dataspace' |