openapi: '3.0.2'
info:
  title: Endpoint Security
  version: '1.2'
servers:
  - url: https://api.server.test/v1

components:
  securitySchemes:
    Basic:
      type: http
      scheme: basic
    Bearer:
      type: http
      scheme: bearer
    Key-Header:
      type: apiKey
      name: x-api_key
      in: header
    AnotherKey-Header:
      type: apiKey
      name: x-app-version
      in: header
    Key-Cookie:
      type: apiKey
      name: CookieName
      in: cookie
    AnotherKey-Cookie:
      type: apiKey
      name: AnotherCookieName
      in: cookie
    Key-Query:
      type: apiKey
      name: key
      in: query
    AnotherKey-Query:
      type: apiKey
      name: another_key
      in: query
    OAuth2-AuthorizationCode:
      type: oauth2
      scheme: bearer
      flows:
        authorizationCode:
          authorizationUrl: https://api.server.test/v1/auth
          tokenUrl: https://api.server.test/v1/token
          scopes:
            read:something: Read all the data
            write:something: Write all the data
    OAuth2-Implicit:
      type: oauth2
      scheme: bearer
      flows:
        implicit:
          authorizationUrl: https://api.server.test/v1/auth
          scopes:
            read:something: Read all the data
            write:something: Write all the data
    OAuth2-ClientCredentials:
      type: oauth2
      scheme: bearer
      flows:
        clientCredentials:
          tokenUrl: https://api.server.test/v1/token
          scopes:
            read:something: Read all the data
            write:something: Write all the data
    OAuth2-Password:
      type: oauth2
      scheme: bearer
      flows:
        password:
          tokenUrl: https://api.server.test/v1/token
          scopes:
            read:something: Read all the data
            write:something: Write all the data

paths:
  /none:
    get:
      security: []
      responses:
        '200':
          description: OK
  /none/basic:
    get:
      security:
        - {}
        - Basic: []
      responses:
        '200':
          description: OK
  /basic:
    get:
      security:
        - Basic: []
      responses:
        '200':
          description: OK
  /bearer:
    get:
      security:
        - Bearer: []
      responses:
        '200':
          description: OK
  /key/header:
    get:
      security:
        - Key-Header: []
        - AnotherKey-Header: []
      responses:
        '200':
          description: OK
  /key/cookie:
    get:
      security:
        - Key-Cookie: []
        - AnotherKey-Cookie: []
      responses:
        '200':
          description: OK
  /key/query:
    get:
      security:
        - Key-Query: []
        - AnotherKey-Query: []
      responses:
        '200':
          description: OK
  /oauth2/authorization-code:
    get:
      security:
        - OAuth2-AuthorizationCode: []
      responses:
        '200':
          description: OK
  /oauth2/implicit:
    get:
      security:
        - OAuth2-Implicit: []
      responses:
        '200':
          description: OK
  /oauth2/client-credentials:
    get:
      security:
        - OAuth2-ClientCredentials: []
      responses:
        '200':
          description: OK
  /oauth2/password:
    get:
      security:
        - OAuth2-Password: []
      responses:
        '200':
          description: OK
  /all:
    get:
      security:
        - {}
        - Basic: []
        - Key-Query: []
        - Key-Header: []
        - Key-Cookie: []
        - OAuth2-AuthorizationCode: []
        - OAuth2-Implicit: []
        - OAuth2-ClientCredentials: []
        - OAuth2-Password: []
      responses:
        '200':
          description: OK
