Skip to content

[BUG] securityScheme does not support x-amazon-* extensions #248

@sakiv

Description

@sakiv

Describe the bug
When adding x-amazon-* extensions to documentation, it drops those attributes.

To Reproduce
Steps to reproduce the behavior:

{
      ...
      "securitySchemes": {
        "customAuthorizer": {
          "type": "apiKey",
          "name": "Authorization",
          "in": "header",
          "description": "JWT token for authenticated users",
          "x-amazon-apigateway-authtype": "custom",
          "x-amazon-apigateway-authorizer": {
            "type": "request",
            "identitySource": "$request.header.Authorization",
            "authorizerUri": "arn:aws:apigateway:${region}:lambda:path/2015-03-31/functions/${function_arns.authorizer}/invocations",
            "authorizerPayloadFormatVersion": "2.0",
            "enableSimpleResponses": true
          }
        }
      },
      ...
}

Expected behavior
x-amazon-* extension attributes should be copied over to the appropriate securityScehme.

Desktop (please complete the following information):

  • Serverless version: 4.17.1
  • serverless-openapi-documenter version: ^0.0.113

Additional context
Current output:

  securitySchemes:
    customAuthorizer:
      description: JWT token for authenticated users
      type: apiKey
      name: Authorization
      in: header

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions