openapi: 3.1.0
info:
  title: Gherkin runner
  version: 0.1.0
paths:
  /health:
    get:
      summary: Health
      description: Answer ``ok``.
      operationId: health_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
                title: Response Health Health Get
  /runs:
    post:
      summary: Run
      description: Run a feature or a scenario and report how it went.
      operationId: run_runs_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RunRequest:
      properties:
        feature:
          type: string
          maxLength: 200
          minLength: 1
          title: Feature
        scenario:
          type: string
          maxLength: 200
          title: Scenario
          default: ''
      type: object
      required:
      - feature
      title: RunRequest
      description: 'What to run: a feature, or one scenario of it.'
    RunResult:
      properties:
        feature:
          type: string
          title: Feature
        scenario:
          type: string
          title: Scenario
        status:
          type: string
          title: Status
        exit_code:
          type: integer
          title: Exit Code
        total:
          type: integer
          title: Total
        passed:
          type: integer
          title: Passed
        failed:
          type: integer
          title: Failed
        skipped:
          type: integer
          title: Skipped
        output:
          type: string
          title: Output
        run_id:
          type: string
          title: Run Id
      type: object
      required:
      - feature
      - scenario
      - status
      - exit_code
      - total
      - passed
      - failed
      - skipped
      - output
      - run_id
      title: RunResult
      description: How a run went.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
