openapi: 3.0.3
info:
  version: 0.9.2
  title: httpbin.org
  description: A simple HTTP Request & Response Service.

servers:
  - url: http://httpbin.org
  - url: https://httpbin.org
  
security:
  - ApiKeyAuth: []
  - OAuth2:
      - read
      - write
paths:
  /get:
    get:
      tags:
        - HTTP Methods
      summary: The request's query parameters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
  /post:
    post:
      tags:
        - HTTP Methods
      summary: The request's POST parameters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
  /delete:
    delete:
      tags:
        - HTTP Methods
      summary: The request's DELETE parameters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
  /put:
    put:
      tags:
        - HTTP Methods
      summary: The request's PUT parameters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object

  /patch:
    patch:
      tags:
        - HTTP Methods
      summary: The request's PATCH parameters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
  /ip:
    get:
      tags:
        - HTTP Methods
      summary: Returns the requester's IP Address.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
  /user-agent:
    get:
      tags:
        - HTTP Methods
      summary: Return the incoming requests's User-Agent header.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
  /uuid:
    get:
      tags:
        - UUID
      summary: Return a UUID4.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object

components:
  securitySchemes:

    BasicAuth:
      type: http
      scheme: basic

    BearerAuth:
      type: http
      scheme: bearer

    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

    OpenID:
      type: openIdConnect
      openIdConnectUrl: https://example.com/.well-known/openid-configuration

    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://example.com/oauth/authorize
          tokenUrl: https://example.com/oauth/token
          scopes:
            read: Grants read access
            write: Grants write access
            admin: Grants access to admin operations