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
      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
      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
      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
      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:
            - read:something
            - write:something
      responses:
        '200':
          description: OK
  /oauth2/implicit:
    get:
      security:
        - OAuth2-Implicit:
            - read:something
            - write:something
      responses:
        '200':
          description: OK
  /oauth2/client-credentials:
    get:
      security:
        - OAuth2-ClientCredentials:
            - read:something
            - write:something
      responses:
        '200':
          description: OK
  /oauth2/password:
    get:
      security:
        - OAuth2-Password:
            - read:something
            - write:something
      responses:
        '200':
          description: OK
  /all:
    get:
      security:
        - {}
        - Basic: []
        - Key-Query: []
        - Key-Header: []
        - Key-Cookie: []
        - OAuth2-AuthorizationCode:
            - read:something
            - write:something
        - OAuth2-Implicit:
            - read:something
            - write:something
        - OAuth2-ClientCredentials:
            - read:something
            - write:something
        - OAuth2-Password:
            - read:something
            - write:something
      responses:
        '200':
          description: OK
