diff --git a/libs/openchallenges/api-description/openapi-for-gpt-test-url.yaml b/libs/openchallenges/api-description/openapi-for-gpt-test-url.yaml new file mode 100644 index 000000000..b80e68822 --- /dev/null +++ b/libs/openchallenges/api-description/openapi-for-gpt-test-url.yaml @@ -0,0 +1,1134 @@ +openapi: 3.0.3 +info: + version: 1.0.0 + title: OpenChallenges Challenge REST API + license: + name: Apache 2.0 + url: https://github.com/Sage-Bionetworks/sage-monorepo/blob/main/LICENSE.txt + contact: + name: Support + url: https://github.com/Sage-Bionetworks/sage-monorepo + x-logo: + url: https://dev.openchallenges.io/img/unsafe/logo/OpenChallenges-logo.png +servers: + - url: https://openchallenges.io/api/v1 +tags: + - name: Challenge + description: Operations about challenges. + - name: ChallengeAnalytics + description: Operations about challenge analytics. + - name: ChallengePlatform + description: Operations about challenge platforms. + - name: EdamConcept + description: Operations about EDAM concepts. +paths: + /challenges: + get: + tags: + - Challenge + summary: List challenges + description: List challenges + operationId: listChallenges + parameters: + - in: query + name: challengeSearchQuery + description: The search query used to find challenges. + schema: + $ref: '#/components/schemas/ChallengeSearchQuery' + # - in: query + # name: pageNumber + # description: The search query used to find challenges. + # schema: + # description: The page number. + # type: integer + # format: int32 + # default: 0 + # minimum: 0 + # - in: query + # name: pageSize + # description: The search query used to find challenges. + # schema: + # description: The number of items in a single page. + # type: integer + # format: int32 + # default: 100 + # minimum: 1 + # - in: query + # name: sort + # description: The search query used to find challenges. + # schema: + # $ref: '#/components/schemas/ChallengeSort' + # - in: query + # name: sortSeed + # description: The search query used to find challenges. + # schema: + # description: The seed that initializes the random sorter. + # type: integer + # format: int32 + # minimum: 0 + # maximum: 2147483647 + # nullable: true + # - in: query + # name: direction + # description: The search query used to find challenges. + # schema: + # $ref: '#/components/schemas/ChallengeDirection' + # - in: query + # name: incentives + # description: The search query used to find challenges. + # schema: + # description: An array of challenge incentive types used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/ChallengeIncentive' + # - in: query + # name: minStartDate + # description: The search query used to find challenges. + # schema: + # description: Keep the challenges that start at this date or later. + # type: string + # format: date + # nullable: true + # example: '2017-07-21' + # - in: query + # name: maxStartDate + # description: The search query used to find challenges. + # schema: + # description: Keep the challenges that start at this date or sooner. + # type: string + # format: date + # nullable: true + # example: '2017-07-21' + # - in: query + # name: platforms + # description: The search query used to find challenges. + # schema: + # description: An array of challenge platform ids used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/ChallengePlatformSlug' + # - in: query + # name: organizations + # description: The search query used to find challenges. + # schema: + # description: An array of organization ids used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/OrganizationId' + # - in: query + # name: status + # description: The search query used to find challenges. + # schema: + # description: An array of challenge status used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/ChallengeStatus' + # - in: query + # name: submissionTypes + # description: The search query used to find challenges. + # schema: + # description: An array of challenge submission types used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/ChallengeSubmissionType' + # - in: query + # name: inputDataTypes + # description: The search query used to find challenges. + # schema: + # description: An array of EDAM concept ID used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/EdamConceptId' + # - in: query + # name: operations + # description: The search query used to find challenges. + # schema: + # description: An array of EDAM concept ID used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/EdamConceptId' + # - in: query + # name: categories + # description: The search query used to find challenges. + # schema: + # description: The array of challenge categories used to filter the results. + # type: array + # items: + # $ref: '#/components/schemas/ChallengeCategory' + # - in: query + # name: searchTerms + # description: The search query used to find challenges. + # searchTerms: + # description: A string of search terms used to filter the results. + # type: string + # example: dream challenge + # parameters: + # - $ref: '#/components/parameters/challengeSearchQuery' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ChallengesPage' + description: Success + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' + /challenges/{challengeId}: + get: + tags: + - Challenge + summary: Get a challenge + description: Returns the challenge specified + operationId: getChallenge + parameters: + - in: path + name: challengeId + description: The unique identifier of the challenge. + required: true + schema: + $ref: '#/components/schemas/ChallengeId' + responses: + '200': + description: A challenge + content: + application/json: + schema: + $ref: '#/components/schemas/Challenge' + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalServerError' + /challenges/{challengeId}/contributions: + get: + tags: + - ChallengeContribution + summary: List challenge contributions + description: List challenge contributions + operationId: listChallengeContributions + parameters: + - in: path + name: challengeId + description: The unique identifier of the challenge. + required: true + schema: + $ref: '#/components/schemas/ChallengeId' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ChallengeContributionsPage' + description: Success + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' + /challengeAnalytics/challengesPerYear: + get: + tags: + - ChallengeAnalytics + summary: Get the number of challenges tracked per year + description: Returns the number of challenges tracked per year + operationId: getChallengesPerYear + responses: + '200': + description: An object + content: + application/json: + schema: + $ref: '#/components/schemas/ChallengesPerYear' + '500': + $ref: '#/components/responses/InternalServerError' + /challengePlatforms: + get: + tags: + - ChallengePlatform + summary: List challenge platforms + description: List challenge platforms + operationId: listChallengePlatforms + parameters: + - in: query + name: challengePlatformSearchQuery + description: The search query used to find challenge platforms. + schema: + $ref: '#/components/schemas/ChallengePlatformSearchQuery' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ChallengePlatformsPage' + description: Success + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' + /challengePlatforms/{challengePlatformName}: + get: + tags: + - ChallengePlatform + summary: Get a challenge platform + description: Returns the challenge platform specified + operationId: getChallengePlatform + parameters: + - in: path + name: challengePlatformName + description: The unique identifier of the challenge platform. + required: true + schema: + $ref: '#/components/schemas/ChallengePlatformName' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ChallengePlatform' + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalServerError' + /edamConcepts: + get: + tags: + - EdamConcept + summary: List EDAM concepts + description: List EDAM concepts + operationId: listEdamConcepts + parameters: + - in: query + name: edamConceptSearchQuery + description: The search query used to find EDAM concepts. + schema: + $ref: '#/components/schemas/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: + description: What to sort results by. + type: string + default: relevance + enum: + - created + - random + - relevance + - starred + - start_date + - end_date + ChallengeDirection: + description: The direction to sort the results by. + type: string + nullable: true + enum: + - asc + - desc + ChallengeIncentive: + description: The incentive type of the challenge. + type: string + enum: + - monetary + - publication + - speaking_engagement + - other + example: publication + ChallengePlatformSlug: + description: The slug of the challenge platform. + type: string + minLength: 3 + maxLength: 30 + pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ + example: example-challenge-platform + OrganizationId: + description: The unique identifier of an organization + type: integer + format: int64 + example: 1 + ChallengeStatus: + description: The status of the challenge. + type: string + enum: + - upcoming + - active + - completed + example: active + ChallengeSubmissionType: + description: The submission type of the challenge. + type: string + enum: + - container_image + - prediction_file + - notebook + - mlcube + - other + example: container_image + EdamConceptId: + description: The unique identifier of the EDAM concept. + type: integer + format: int64 + example: 1 + ChallengeCategory: + description: The category of the challenge. + type: string + enum: + - featured + - benchmark + - hackathon + - starting_soon + - ending_soon + - recently_started + - recently_ended + example: featured + ChallengeSearchQuery: + type: object + description: A challenge 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 + sort: + $ref: '#/components/schemas/ChallengeSort' + sortSeed: + description: The seed that initializes the random sorter. + type: integer + format: int32 + minimum: 0 + maximum: 2147483647 + nullable: true + direction: + $ref: '#/components/schemas/ChallengeDirection' + incentives: + description: An array of challenge incentive types used to filter the results. + type: array + items: + $ref: '#/components/schemas/ChallengeIncentive' + minStartDate: + description: Keep the challenges that start at this date or later. + type: string + format: date + nullable: true + example: '2017-07-21' + maxStartDate: + description: Keep the challenges that start at this date or sooner. + type: string + format: date + nullable: true + example: '2017-07-21' + platforms: + description: An array of challenge platform ids used to filter the results. + type: array + items: + $ref: '#/components/schemas/ChallengePlatformSlug' + organizations: + description: An array of organization ids used to filter the results. + type: array + items: + $ref: '#/components/schemas/OrganizationId' + status: + description: An array of challenge status used to filter the results. + type: array + items: + $ref: '#/components/schemas/ChallengeStatus' + submissionTypes: + description: An array of challenge submission types used to filter the results. + type: array + items: + $ref: '#/components/schemas/ChallengeSubmissionType' + inputDataTypes: + description: An array of EDAM concept ID used to filter the results. + type: array + items: + $ref: '#/components/schemas/EdamConceptId' + operations: + description: An array of EDAM concept ID used to filter the results. + type: array + items: + $ref: '#/components/schemas/EdamConceptId' + categories: + description: The array of challenge categories used to filter the results. + type: array + items: + $ref: '#/components/schemas/ChallengeCategory' + searchTerms: + description: A string of search terms used to filter the results. + type: string + example: dream challenge + PageMetadata: + type: object + description: The metadata of a page. + properties: + number: + description: The page number. + type: integer + format: int32 + example: 99 + size: + description: The number of items in a single page. + type: integer + format: int32 + example: 99 + totalElements: + description: Total number of elements in the result set. + type: integer + format: int64 + example: 99 + totalPages: + description: Total number of pages in the result set. + type: integer + format: int32 + example: 99 + hasNext: + description: Returns if there is a next page. + type: boolean + example: true + hasPrevious: + description: Returns if there is a previous page. + type: boolean + example: true + required: + - number + - size + - totalElements + - totalPages + - hasNext + - hasPrevious + ChallengeId: + description: The unique identifier of the challenge. + type: integer + format: int64 + example: 1 + ChallengeSlug: + description: The unique slug of the challenge. + type: string + minLength: 3 + maxLength: 255 + pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ + example: awesome-challenge + ChallengeName: + description: The name of the challenge. + type: string + minLength: 3 + maxLength: 255 + ChallengeHeadline: + description: The headline of the challenge. + type: string + minLength: 0 + maxLength: 80 + nullable: true + example: Example challenge headline + ChallengeDescription: + description: The description of the challenge. + type: string + minLength: 0 + maxLength: 1000 + example: This is an example description of the challenge. + ChallengeDoi: + description: The DOI of the challenge. + type: string + format: url + maxLength: 120 + nullable: true + example: https://doi.org/123/abc + ChallengePlatformId: + description: The unique identifier of a challenge platform. + type: integer + format: int64 + example: 1 + ChallengePlatformName: + description: The name of the challenge platform. + type: string + minLength: 3 + maxLength: 30 + SimpleChallengePlatform: + type: object + description: A simple challenge platform. + properties: + id: + $ref: '#/components/schemas/ChallengePlatformId' + slug: + $ref: '#/components/schemas/ChallengePlatformSlug' + name: + $ref: '#/components/schemas/ChallengePlatformName' + nullable: true + required: + - id + - slug + - name + Url: + description: A URL to the website or image. + type: string + format: url + maxLength: 500 + nullable: true + example: https://openchallenges.io + EdamConcept: + type: object + description: The EDAM concept. + properties: + id: + $ref: '#/components/schemas/EdamConceptId' + classId: + type: string + example: http://edamontology.org/data_0850 + maxLength: 60 + preferredLabel: + type: string + example: Sequence set + maxLength: 80 + required: + - id + - classId + - preferredLabel + nullable: true + ChallengeStartDate: + description: The start date of the challenge. + type: string + format: date + nullable: true + example: '2017-07-21' + ChallengeEndDate: + description: The end date of the challenge. + type: string + format: date + nullable: true + example: '2017-07-21' + CreatedDateTime: + description: Datetime when the object was added to the database. + type: string + format: date-time + example: '2022-07-04T22:19:11Z' + UpdatedDateTime: + description: Datetime when the object was last modified in the database. + type: string + format: date-time + example: '2022-07-04T22:19:11Z' + Challenge: + type: object + description: A challenge + properties: + id: + $ref: '#/components/schemas/ChallengeId' + slug: + $ref: '#/components/schemas/ChallengeSlug' + name: + $ref: '#/components/schemas/ChallengeName' + headline: + $ref: '#/components/schemas/ChallengeHeadline' + description: + $ref: '#/components/schemas/ChallengeDescription' + doi: + $ref: '#/components/schemas/ChallengeDoi' + status: + $ref: '#/components/schemas/ChallengeStatus' + platform: + $ref: '#/components/schemas/SimpleChallengePlatform' + websiteUrl: + $ref: '#/components/schemas/Url' + avatarUrl: + $ref: '#/components/schemas/Url' + incentives: + type: array + items: + $ref: '#/components/schemas/ChallengeIncentive' + submissionTypes: + type: array + items: + $ref: '#/components/schemas/ChallengeSubmissionType' + inputDataTypes: + type: array + items: + $ref: '#/components/schemas/EdamConcept' + categories: + type: array + items: + $ref: '#/components/schemas/ChallengeCategory' + startDate: + $ref: '#/components/schemas/ChallengeStartDate' + endDate: + $ref: '#/components/schemas/ChallengeEndDate' + starredCount: + description: The number of times the challenge has been starred by users. + type: integer + default: 0 + minimum: 0 + example: 100 + operation: + $ref: '#/components/schemas/EdamConcept' + createdAt: + $ref: '#/components/schemas/CreatedDateTime' + updatedAt: + $ref: '#/components/schemas/UpdatedDateTime' + required: + - id + - slug + - name + - description + - status + - incentives + - submissionTypes + - starredCount + - createdAt + - updatedAt + - categories + ChallengesPage: + type: object + description: A page of challenges. + properties: + number: + description: The page number. + type: integer + format: int32 + example: 99 + size: + description: The number of items in a single page. + type: integer + format: int32 + example: 99 + totalElements: + description: Total number of elements in the result set. + type: integer + format: int64 + example: 99 + totalPages: + description: Total number of pages in the result set. + type: integer + format: int32 + example: 99 + hasNext: + description: Returns if there is a next page. + type: boolean + example: True + hasPrevious: + description: Returns if there is a previous page. + type: boolean + example: True + challenges: + description: A list of challenges. + type: array + items: + $ref: '#/components/schemas/Challenge' + required: + - number + - size + - totalElements + - totalPages + - hasNext + - hasPrevious + - challenges + x-java-class-annotations: + - '@lombok.Builder' + BasicError: + type: object + description: Problem details (tools.ietf.org/html/rfc7807) + properties: + title: + type: string + description: A human readable documentation for the problem type + status: + type: integer + description: The HTTP status code + detail: + type: string + description: A human readable explanation specific to this occurrence of the problem + type: + type: string + description: An absolute URI that identifies the problem type + required: + - title + - status + x-java-class-annotations: + - '@lombok.AllArgsConstructor' + - '@lombok.Builder' + ChallengeContributionRole: + description: The nature of a challenge contribution. + type: string + enum: + - challenge_organizer + - data_contributor + - sponsor + example: challenge_organizer + ChallengeContribution: + type: object + description: A challenge contribution. + properties: + challengeId: + $ref: '#/components/schemas/ChallengeId' + organizationId: + $ref: '#/components/schemas/OrganizationId' + role: + $ref: '#/components/schemas/ChallengeContributionRole' + required: + - challengeId + - organizationId + - role + ChallengeContributionsPage: + type: object + description: A page of challenge contributions. + properties: + number: + description: The page number. + type: integer + format: int32 + example: 99 + size: + description: The number of items in a single page. + type: integer + format: int32 + example: 99 + totalElements: + description: Total number of elements in the result set. + type: integer + format: int64 + example: 99 + totalPages: + description: Total number of pages in the result set. + type: integer + format: int32 + example: 99 + hasNext: + description: Returns if there is a next page. + type: boolean + example: True + hasPrevious: + description: Returns if there is a previous page. + type: boolean + example: True + challengeContributions: + description: A list of challenge contributions. + type: array + items: + $ref: '#/components/schemas/ChallengeContribution' + required: + - number + - size + - totalElements + - totalPages + - hasNext + - hasPrevious + - challengeContributions + x-java-class-annotations: + - '@lombok.Builder' + ChallengesPerYear: + type: object + description: An object + properties: + years: + type: array + items: + type: string + challengeCounts: + type: array + items: + type: integer + undatedChallengeCount: + type: integer + default: 0 + minimum: 0 + example: 0 + required: + - years + - challengeCounts + - undatedChallengeCount + x-java-class-annotations: + - '@lombok.Builder' + ChallengePlatformSort: + description: What to sort results by. + type: string + default: relevance + enum: + - name + - relevance + ChallengePlatformDirection: + description: The direction to sort the results by. + type: string + nullable: true + enum: + - asc + - desc + ChallengePlatformSearchQuery: + type: object + description: A challenge platform 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 + sort: + $ref: '#/components/schemas/ChallengePlatformSort' + direction: + $ref: '#/components/schemas/ChallengePlatformDirection' + slugs: + description: An array of challenge platform slugs used to filter the results. + type: array + items: + $ref: '#/components/schemas/ChallengePlatformSlug' + searchTerms: + description: A string of search terms used to filter the results. + type: string + example: synapse + ChallengePlatform: + type: object + description: A challenge platform + properties: + id: + $ref: '#/components/schemas/ChallengePlatformId' + slug: + $ref: '#/components/schemas/ChallengePlatformSlug' + name: + $ref: '#/components/schemas/ChallengePlatformName' + avatarUrl: + type: string + format: url + example: https://via.placeholder.com/300.png + websiteUrl: + type: string + format: url + example: https://example.com + createdAt: + type: string + format: date-time + example: '2022-07-04T22:19:11Z' + updatedAt: + type: string + format: date-time + example: '2022-07-04T22:19:11Z' + required: + - id + - slug + - name + - avatarUrl + - websiteUrl + - createdAt + - updatedAt + ChallengePlatformsPage: + type: object + description: A page of challenge platforms. + properties: + number: + description: The page number. + type: integer + format: int32 + example: 99 + size: + description: The number of items in a single page. + type: integer + format: int32 + example: 99 + totalElements: + description: Total number of elements in the result set. + type: integer + format: int64 + example: 99 + totalPages: + description: Total number of pages in the result set. + type: integer + format: int32 + example: 99 + hasNext: + description: Returns if there is a next page. + type: boolean + example: True + hasPrevious: + description: Returns if there is a previous page. + type: boolean + example: True + challengePlatforms: + description: A list of challenge platforms. + type: array + items: + $ref: '#/components/schemas/ChallengePlatform' + required: + - number + - size + - totalElements + - totalPages + - hasNext + - hasPrevious + - challengePlatforms + x-java-class-annotations: + - '@lombok.Builder' + EdamConceptSort: + description: What to sort results by. + type: string + default: relevance + enum: + - preferred_label + - relevance + EdamConceptDirection: + description: The direction to sort the results by. + type: string + nullable: true + enum: + - asc + - desc + EdamSection: + description: The EDAM section (sub-ontology). + type: string + enum: + - data + - format + - identifier + - operation + - topic + example: data + 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 + sort: + $ref: '#/components/schemas/EdamConceptSort' + direction: + $ref: '#/components/schemas/EdamConceptDirection' + ids: + description: An array of EDAM concept ids used to filter the results. + type: array + items: + $ref: '#/components/schemas/EdamConceptId' + searchTerms: + description: A string of search terms used to filter the results. + type: string + example: sequence image + sections: + description: An array of EDAM sections (sub-ontologies) used to filter the results. + type: array + items: + $ref: '#/components/schemas/EdamSection' + EdamConceptsPage: + type: object + description: A page of EDAM concepts. + properties: + number: + description: The page number. + type: integer + format: int32 + example: 99 + size: + description: The number of items in a single page. + type: integer + format: int32 + example: 99 + totalElements: + description: Total number of elements in the result set. + type: integer + format: int64 + example: 99 + totalPages: + description: Total number of pages in the result set. + type: integer + format: int32 + example: 99 + hasNext: + description: Returns if there is a next page. + type: boolean + example: True + hasPrevious: + description: Returns if there is a previous page. + type: boolean + example: True + edamConcepts: + description: A list of EDAM concepts. + type: array + items: + $ref: '#/components/schemas/EdamConcept' + required: + - number + - size + - totalElements + - totalPages + - hasNext + - hasPrevious + - edamConcepts + x-java-class-annotations: + - '@lombok.Builder' + parameters: + challengeSearchQuery: + name: challengeSearchQuery + description: The search query used to find challenges. + in: query + schema: + $ref: '#/components/schemas/ChallengeSearchQuery' + challengeId: + name: challengeId + in: path + description: The unique identifier of the challenge. + required: true + schema: + $ref: '#/components/schemas/ChallengeId' + challengePlatformSearchQuery: + name: challengePlatformSearchQuery + description: The search query used to find challenge platforms. + in: query + schema: + $ref: '#/components/schemas/ChallengePlatformSearchQuery' + challengePlatformName: + name: challengePlatformName + in: path + description: The unique identifier of the challenge platform. + 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 + content: + application/problem+json: + schema: + $ref: '#/components/schemas/BasicError' + InternalServerError: + description: The request cannot be fulfilled due to an unexpected server error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/BasicError' + NotFound: + description: The specified resource was not found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/BasicError' diff --git a/libs/openchallenges/api-description/openapi-for-gpt.yaml b/libs/openchallenges/api-description/openapi-for-gpt.yaml index 9ed552e5a..a51d1d322 100644 --- a/libs/openchallenges/api-description/openapi-for-gpt.yaml +++ b/libs/openchallenges/api-description/openapi-for-gpt.yaml @@ -40,7 +40,7 @@ paths: description: The number of items in a single page. type: integer format: int32 - default: 100 + default: 10 minimum: 1 - in: query name: platforms @@ -53,6 +53,13 @@ paths: maxLength: 30 pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$' example: example-challenge-platform + - in: query + name: status + description: An array of challenge status used to filter the results. + schema: + type: array + items: + $ref: '#/components/schemas/ChallengeStatus' responses: '200': content: @@ -131,8 +138,8 @@ components: # $ref: '#/components/schemas/ChallengeDescription' # doi: # $ref: '#/components/schemas/ChallengeDoi' - # status: - # $ref: '#/components/schemas/ChallengeStatus' + status: + $ref: '#/components/schemas/ChallengeStatus' # platform: # $ref: '#/components/schemas/SimpleChallengePlatform' # websiteUrl: @@ -170,7 +177,7 @@ components: - slug - name # - description - # - status + - status # - incentives # - submissionTypes # - starredCount @@ -193,6 +200,14 @@ components: type: string minLength: 3 maxLength: 255 + ChallengeStatus: + description: The status of the challenge. + type: string + enum: + - upcoming + - active + - completed + example: active BasicError: type: object description: Problem details (tools.ietf.org/html/rfc7807)