diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 9879e10a..d4bd5ae4 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -490,7 +490,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/listTypesSuccessResponse' + oneOf: + - $ref: '#/components/schemas/listTypesSuccessResponse' + - $ref: '#/components/schemas/listTypesOwner' '400': description: Bad Request content: @@ -2119,6 +2121,45 @@ components: type: 'urn:dx:cat:InvalidSyntax' title: Invalid Syntax detail: Wrong Item Type + listTypesOwner: + type: object + title: Response for list owner + description: API response when item type is owner + properties: + type: + type: string + description: | + URN type of the response indicating if the query was successful or if any errors have + been triggered. + title: + description: A human readable title to the message response. + totalHits: + type: integer + description: Total number of documents which matched the query. + format: int32 + results: + type: array + description: Results which matched the query. This is an array of objects. + items: + type: object + required: + - type + example: + type: urn:dx:cat:Success + title: Success + totalHits: 1 + results: + - '@context': https://voc.iudx.org.in/ + type: + - iudx:Owner + name: IudxOwner + description: owner item for IUDX entities + id: cc18c925-8990-3a07-9cac-0bb2bd8166f6 + itemStatus: ACTIVE + itemCreatedAt: 2023-09-08T10:00:02+0530 + + + invalidIdErrorResponse: type: object title: Invalid ID diff --git a/src/main/java/iudx/catalogue/server/apiserver/ListApis.java b/src/main/java/iudx/catalogue/server/apiserver/ListApis.java index e490e113..82367f59 100644 --- a/src/main/java/iudx/catalogue/server/apiserver/ListApis.java +++ b/src/main/java/iudx/catalogue/server/apiserver/ListApis.java @@ -3,8 +3,9 @@ * *
Callback handlers for List APIS
*/
+
package iudx.catalogue.server.apiserver;
import static iudx.catalogue.server.apiserver.util.Constants.*;
diff --git a/src/main/java/iudx/catalogue/server/database/DatabaseService.java b/src/main/java/iudx/catalogue/server/database/DatabaseService.java
index b871026b..7b574fa1 100644
--- a/src/main/java/iudx/catalogue/server/database/DatabaseService.java
+++ b/src/main/java/iudx/catalogue/server/database/DatabaseService.java
@@ -114,7 +114,7 @@ DatabaseService nlpSearchLocationQuery(JsonArray request, JsonObject queryParams
DatabaseService listItems(JsonObject request, Handler