openapi: 3.0.3
info:
  title: DummyJSON (HTTP statuses)
  version: 1.0.0
  description: DummyJSON answers GET /http/{status} with that same status, which is handy to test error handling.
servers:
  - url: https://dummyjson.com
paths:
  /http/{status}:
    get:
      operationId: getStatus
      summary: Answer with the status you ask for
      parameters:
        - name: status
          in: path
          required: true
          schema: { type: integer, example: 503 }
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status: { type: integer, example: 200 }
                  message: { type: string, example: OK }
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status: { type: integer, example: 404 }
                  message: { type: string, example: Not Found }
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  status: { type: integer, example: 503 }
                  message: { type: string, example: Service Unavailable }
