From cb47376138179ccc4f73e23f68f8ce41ea44437a Mon Sep 17 00:00:00 2001 From: Thomas Schaffter Date: Tue, 9 Apr 2024 18:57:17 +0000 Subject: [PATCH] build OC api description --- .../build/challenge.openapi.yaml | 80 +++++++++++++++++++ .../api-description/build/openapi.yaml | 80 +++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/libs/openchallenges/api-description/build/challenge.openapi.yaml b/libs/openchallenges/api-description/build/challenge.openapi.yaml index 3fc81c16cd..71064a30af 100644 --- a/libs/openchallenges/api-description/build/challenge.openapi.yaml +++ b/libs/openchallenges/api-description/build/challenge.openapi.yaml @@ -19,6 +19,8 @@ tags: description: Operations about challenge analytics. - name: ChallengePlatform description: Operations about challenge platforms. + - name: EdamConcept + description: Operations about EDAM concepts. paths: /challenges: get: @@ -136,6 +138,26 @@ paths: $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' + /edamConcepts: + get: + tags: + - EdamConcept + summary: List EDAM concepts + description: List EDAM concepts + operationId: listEdamConcepts + parameters: + - $ref: '#/components/parameters/edamConceptSearchQuery' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EdamConceptsPage' + description: Success + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' components: schemas: ChallengeSort: @@ -699,6 +721,58 @@ components: - challengePlatforms x-java-class-annotations: - '@lombok.Builder' + EdamConceptSearchQuery: + type: object + description: An EDAM concept search query. + properties: + pageNumber: + description: The page number. + type: integer + format: int32 + default: 0 + minimum: 0 + pageSize: + description: The number of items in a single page. + type: integer + format: int32 + default: 100 + minimum: 1 + searchTerms: + description: A string of search terms used to filter the results. + type: string + example: sequence image + EdamConcept: + type: object + description: The EDAM concept. + properties: + classId: + type: string + example: http://edamontology.org/data_0850 + maxLength: 60 + preferredLabel: + type: string + example: Sequence set + maxLength: 80 + required: + - classId + - preferredLabel + nullable: true + EdamConceptsPage: + type: object + description: A page of EDAM concepts. + allOf: + - $ref: '#/components/schemas/PageMetadata' + - type: object + properties: + edamConcepts: + description: A list of EDAM concepts. + type: array + items: + $ref: '#/components/schemas/EdamConcept' + required: + - edamConcepts + x-java-class-annotations: + - '@lombok.Builder' parameters: challengeSearchQuery: name: challengeSearchQuery @@ -726,6 +800,12 @@ components: required: true schema: $ref: '#/components/schemas/ChallengePlatformName' + edamConceptSearchQuery: + name: edamConceptSearchQuery + description: The search query used to find EDAM concepts. + in: query + schema: + $ref: '#/components/schemas/EdamConceptSearchQuery' responses: BadRequest: description: Invalid request diff --git a/libs/openchallenges/api-description/build/openapi.yaml b/libs/openchallenges/api-description/build/openapi.yaml index 738df04bdd..9ba2c98642 100644 --- a/libs/openchallenges/api-description/build/openapi.yaml +++ b/libs/openchallenges/api-description/build/openapi.yaml @@ -19,6 +19,8 @@ tags: description: Operations about challenge analytics. - name: ChallengePlatform description: Operations about challenge platforms. + - name: EdamConcept + description: Operations about EDAM concepts. - name: Image description: Operations about images - name: Organization @@ -142,6 +144,26 @@ paths: $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' + /edamConcepts: + get: + tags: + - EdamConcept + summary: List EDAM concepts + description: List EDAM concepts + operationId: listEdamConcepts + parameters: + - $ref: '#/components/parameters/edamConceptSearchQuery' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EdamConceptsPage' + description: Success + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' /images: get: tags: @@ -851,6 +873,58 @@ components: - challengePlatforms x-java-class-annotations: - '@lombok.Builder' + EdamConceptSearchQuery: + type: object + description: An EDAM concept search query. + properties: + pageNumber: + description: The page number. + type: integer + format: int32 + default: 0 + minimum: 0 + pageSize: + description: The number of items in a single page. + type: integer + format: int32 + default: 100 + minimum: 1 + searchTerms: + description: A string of search terms used to filter the results. + type: string + example: sequence image + EdamConcept: + type: object + description: The EDAM concept. + properties: + classId: + type: string + example: 'http://edamontology.org/data_0850' + maxLength: 60 + preferredLabel: + type: string + example: Sequence set + maxLength: 80 + required: + - classId + - preferredLabel + nullable: true + EdamConceptsPage: + type: object + description: A page of EDAM concepts. + allOf: + - $ref: '#/components/schemas/PageMetadata' + - type: object + properties: + edamConcepts: + description: A list of EDAM concepts. + type: array + items: + $ref: '#/components/schemas/EdamConcept' + required: + - edamConcepts + x-java-class-annotations: + - '@lombok.Builder' ImageKey: description: The unique identifier of the image. type: string @@ -1207,6 +1281,12 @@ components: required: true schema: $ref: '#/components/schemas/ChallengePlatformName' + edamConceptSearchQuery: + name: edamConceptSearchQuery + description: The search query used to find EDAM concepts. + in: query + schema: + $ref: '#/components/schemas/EdamConceptSearchQuery' imageQuery: name: imageQuery description: The query used to get an image.