openapi: 3.0.0
info:
  title: Global Code Quality Initiative (GCQI)
  description: |-
    This in an API of organization harnessing data about all people who care about code quality.
  contact:
    email: petr.skoda@matfyz.cuni.cz
  license:
    name: MIT
    url: https://opensource.org/license/mit
  version: 42.0.0
paths:
  /user:
    get:
      summary: Return information about a single user.
      parameters:
        - name: identifier
          in: query
          description: User identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user'
        '404':
          description: User not found.
        default:
          description: Unexpected error

  /users:
    get:
      summary: Return a list of users.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/users'
        default:
          description: Unexpected error
components:
  schemas:
    users:
      type: array
      items:
        type: object
        properties:
          identifier:
            type: string
            example: 001
          link:
            type: string
            example: https://example.com/users/?identifier=001
    user:
      type: object
      properties:
        identifier:
          type: string
          example: 001
        name:
          type: string
          name: Ailish
