Skip to content

Commit

Permalink
build OC api description
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Apr 9, 2024
1 parent cb16113 commit cb47376
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 0 deletions.
80 changes: 80 additions & 0 deletions libs/openchallenges/api-description/build/challenge.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
80 changes: 80 additions & 0 deletions libs/openchallenges/api-description/build/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit cb47376

Please sign in to comment.