ErikWittern / openapi-snippet

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

Missing header generation with compound security header. #104

Open wRLSS opened 1 month ago

wRLSS commented 1 month ago

OpenAPI 3.0 supports usage of multiple API Keys.

components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
    appId:
      type: apiKey
      in: header
      name: X-APP-ID
security:
  - apiKey: []
    appId:  []

However, X-APP-ID header is not properly appended to codesnippet during generation producing

curl --request POST \
  --url https://petstore.com/api/v1/pet/ \
  --header 'X-API-Key: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{}'