Skip to content

Instantly share code, notes, and snippets.

@bandantonio
Last active January 6, 2023 12:51
Show Gist options
  • Save bandantonio/e1331ba5afd24485de5e6229c91d25ed to your computer and use it in GitHub Desktop.
Save bandantonio/e1331ba5afd24485de5e6229c91d25ed to your computer and use it in GitHub Desktop.
Redocly hide openAPI extensions
openapi: 3.1.0
info:
version: 1.0.0
title: Custom decorators demo
description: This API showcases usage of the custom decorator that removes extensions starting with `x-amazon-gateway` during the `bundle` process.
servers:
- url: 'https://example.com/api/v1'
x-amazon-apigateway-api-key-source : HEADER
paths:
/status:
get:
summary: Get status
operationId: getStatus
security: []
x-amazon-apigateway-integration:
uri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ListPostsFunction.Arn}/invocations
httpMethod: POST
type: aws_proxy
responses:
'204':
description: Status OK
'400':
description: Status not OK
x-amazon-apigateway-endpoint-configuration":
disableExecuteApiEndpoint: true
x-amazon-apigateway-gateway-responses:
DEFAULT_4XX:
responseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: '''domain.com'''
responseTemplates:
application/json: '{"message": test 4xx b }'
INVALID_API_KEY:
statusCode: '429'
responseTemplates:
application/json: '{"message": test forbidden }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment