ErikWittern / openapi-snippet

Generates code snippets for given Swagger / Open API documents
MIT License
116 stars 67 forks source link

Add support for type: http and schema basic or bearer in paths #37

Closed codyaray closed 4 years ago

codyaray commented 4 years ago

It looks like https://github.com/ErikWittern/openapi-snippet/pull/19 missed a couple changes.

paths:
  /users:
    get:
      security:
        - api-key: []

components:
  securitySchemes:
    api-key:
      type: http
      scheme: basic

Without this change, no auth header is added for the above schema. Only type: basic results in an HTTP Basic Authorization header.

ErikWittern commented 4 years ago

@codyaray Great, thank your for this PR!