info:
  description: No description
  license:
    name: MIT
  title: NonameApp
  version: 0.0.0
openapi: 3.0.0
paths:
  /api/ping:
    post:
      description: "\n        Testovací metoda pro dostupnost\n        "
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  api/ping:
                    description: Řetězec 'pong' jako odpověď na ping
                    type: string
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                type: object
          description: OK
      summary: Testovací metoda pro dostupnost
  /api/round_finish_running:
    post:
      description: "\n        Finishes the currently running round.\n        "
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  api/round_finish_running:
                    properties:
                      description:
                        description: Round description
                        type: string
                      dt_from:
                        description: Round start date/time
                        type: string
                      dt_to:
                        description: Round end date/time
                        type: string
                      id:
                        description: Round ID
                        type: string
                      sorting:
                        description: Round sorting order
                        type: integer
                    required:
                    - id
                    - sorting
                    type: object
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                type: object
          description: OK
        '500':
          content:
            application/json:
              examples:
                status_0:
                  summary: Cannot finish a round because no round is currently running.
                  value:
                    status: 1004
                    status_message: Cannot finish a round because no round is currently
                      running.
                status_1:
                  summary: Cannot finish a round because it has already ended.
                  value:
                    status: 1005
                    status_message: Cannot finish a round because it has already ended.
              schema:
                oneOf:
                - properties:
                    status:
                      description: Internal number code
                      example: 1004
                      type: number
                    status_message:
                      description: Error description
                      example: Cannot finish a round because no round is currently
                        running.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
                - properties:
                    status:
                      description: Internal number code
                      example: 1005
                      type: number
                    status_message:
                      description: Error description
                      example: Cannot finish a round because it has already ended.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
          description: Error
      summary: Finishes the currently running round.
  /api/round_get:
    post:
      description: "\n        Returns a specific round by the given ID.\n        "
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  description: Round ID
                  type: string
              required:
              - id
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  api/round_get:
                    properties:
                      description:
                        description: Round description
                        type: string
                      dt_from:
                        description: Round start date/time
                        type: string
                      dt_to:
                        description: Round end date/time
                        type: string
                      id:
                        description: Round ID
                        type: string
                      sorting:
                        description: Round sorting order
                        type: integer
                    required:
                    - id
                    - sorting
                    type: object
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                type: object
          description: OK
        '404':
          content:
            application/json:
              examples:
                status_0:
                  summary: A round with the given ID was not found.
                  value:
                    status: 1001
                    status_message: A round with the given ID was not found.
              schema:
                oneOf:
                - properties:
                    status:
                      description: Internal number code
                      example: 1001
                      type: number
                    status_message:
                      description: Error description
                      example: A round with the given ID was not found.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
          description: Error
      summary: Returns a specific round by the given ID.
  /api/round_list:
    post:
      description: "\n        Returns the list of configured rounds in the system.\n\
        \        "
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  api/round_list:
                    items:
                      properties:
                        description:
                          description: Round description
                          type: string
                        dt_from:
                          description: Round start date/time
                          type: string
                        dt_to:
                          description: Round end date/time
                          type: string
                        id:
                          description: Round ID
                          type: string
                        sorting:
                          description: Round sorting order
                          type: integer
                      required:
                      - id
                      - sorting
                      type: object
                    type: array
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                type: object
          description: OK
      summary: Returns the list of configured rounds in the system.
  /api/round_start_next:
    post:
      description: "\n        Starts the next available voting round.\n        "
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  api/round_start_next:
                    properties:
                      description:
                        description: Round description
                        type: string
                      dt_from:
                        description: Round start date/time
                        type: string
                      dt_to:
                        description: Round end date/time
                        type: string
                      id:
                        description: Round ID
                        type: string
                      sorting:
                        description: Round sorting order
                        type: integer
                    required:
                    - id
                    - sorting
                    type: object
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                type: object
          description: OK
        '500':
          content:
            application/json:
              examples:
                status_0:
                  summary: No next round is available to start.
                  value:
                    status: 1002
                    status_message: No next round is available to start.
                status_1:
                  summary: Cannot start next round because a different round is already
                    running.
                  value:
                    status: 1003
                    status_message: Cannot start next round because a different round
                      is already running.
                status_2:
                  summary: Cannot finish a round because it has already ended.
                  value:
                    status: 1005
                    status_message: Cannot finish a round because it has already ended.
              schema:
                oneOf:
                - properties:
                    status:
                      description: Internal number code
                      example: 1002
                      type: number
                    status_message:
                      description: Error description
                      example: No next round is available to start.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
                - properties:
                    status:
                      description: Internal number code
                      example: 1003
                      type: number
                    status_message:
                      description: Error description
                      example: Cannot start next round because a different round is
                        already running.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
                - properties:
                    status:
                      description: Internal number code
                      example: 1005
                      type: number
                    status_message:
                      description: Error description
                      example: Cannot finish a round because it has already ended.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
          description: Error
      summary: Starts the next available voting round.
  /api/round_voting:
    post:
      description: "\n        Returns vote status for the given round.\n        "
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  description: Round ID
                  type: string
              required:
              - id
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  api/round_voting:
                    items:
                      properties:
                        count:
                          description: Number of received votes
                          type: integer
                        vote:
                          description: Vote label
                          type: string
                      required:
                      - vote
                      - count
                      type: object
                    type: array
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                type: object
          description: OK
        '404':
          content:
            application/json:
              examples:
                status_0:
                  summary: A round with the given ID was not found.
                  value:
                    status: 1001
                    status_message: A round with the given ID was not found.
              schema:
                oneOf:
                - properties:
                    status:
                      description: Internal number code
                      example: 1001
                      type: number
                    status_message:
                      description: Error description
                      example: A round with the given ID was not found.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
          description: Error
      summary: Returns vote status for the given round.
  /tester/ping:
    post:
      description: "\n        Testovací metoda pro dostupnost\n        "
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                  tester/ping:
                    description: Řetězec 'pong' jako odpověď na ping
                    type: string
                type: object
          description: OK
      summary: Testovací metoda pro dostupnost
  /tester/reset_rounds:
    post:
      description: "\n        Resets all rounds and counters in database\n        "
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                  tester/reset_rounds:
                    description: True if successfully reset rounds, False otherwise
                    type: boolean
                type: object
          description: OK
      summary: Resets all rounds and counters in database
  /tester/running_round_vote_add:
    post:
      description: "\n        Adds a vote for the current round in Redis.\n      \
        \  "
      requestBody:
        content:
          application/json:
            schema:
              properties:
                vote_value:
                  description: Voted value to add
                  type: string
              required:
              - vote_value
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  status:
                    example: 200
                    type: number
                  status_message:
                    example: OK
                    type: string
                  tester/running_round_vote_add:
                    description: True if successfully added vote, False otherwise
                    type: boolean
                type: object
          description: OK
        '404':
          content:
            application/json:
              examples:
                status_0:
                  summary: A round with the given ID was not found.
                  value:
                    status: 2001
                    status_message: A round with the given ID was not found.
              schema:
                oneOf:
                - properties:
                    status:
                      description: Internal number code
                      example: 2001
                      type: number
                    status_message:
                      description: Error description
                      example: A round with the given ID was not found.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
          description: Error
        '500':
          content:
            application/json:
              examples:
                status_0:
                  summary: The given vote value is not known.
                  value:
                    status: 2002
                    status_message: The given vote value is not known.
              schema:
                oneOf:
                - properties:
                    status:
                      description: Internal number code
                      example: 2002
                      type: number
                    status_message:
                      description: Error description
                      example: The given vote value is not known.
                      type: string
                  required:
                  - status
                  - status_message
                  type: object
          description: Error
      summary: Adds a vote for the current round in Redis.
servers:
- description: Api url
  url: http://ep-hl-contests-nag:80
