Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(openchallenges): expand oc gpt filters to list challenges #2707

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rrchai
Copy link
Contributor

@rrchai rrchai commented Jun 10, 2024

No description provided.

@rrchai
Copy link
Contributor Author

rrchai commented Jun 19, 2024

Errors:

Server URL http://localhost/v1 is not under the root origin https://localhost; ignoring it
# not good
servers:
  - url: http://localhost/v1
# good
servers:
  - url: https://localhost/v1
In context=('components', 'schemas', 'EdamConceptsPage'), object schema missing properties
# not good
ChallengesPage:
  type: object
  description: A page of challenges.
  allOf:
    - $ref: '#/components/schemas/PageMetadata'
    type: object
    properties:
      challenges:
        description: A list of challenges.
        type: array
        items:
          $ref: '#/components/schemas/Challenge'
        required:
          - challenges
      x-java-class-annotations:
        - '@lombok.Builder'
# good
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'
Path /challenges/{challengeId} has unrecognized method $ref; skipping
# not good
  /challenges/{challengeId}/contributions:
    parameters:
      - $ref: '#/components/parameters/challengeId'
    get:
      tags:
        - ChallengeContribution
      summary: List challenge contributions
      description: List challenge contributions
      operationId: listChallengeContributions
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChallengeContributionsPage'
          description: Success
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
# good
  /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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant