public final class CorsHttpIntegration extends java.lang.Object implements ApiGatewayMapper
x-amazon-apigateway-cors
extension for API Gateway HTTP APIs using values from the
Smithy cors trait.
allowOrigins is populated based on the origin
property of the cors trait.maxAge is populated based on the maxAge
property of the cors trait.allowMethods is populated by scanning the generated
OpenAPI definition for every defined method.exposedHeaders is set to "*" to expose all headers IFF
the service does not use HTTP credentials, and no value is provided
to the additionalExposedHeaders property of the Smithy
cors trait. Otherwise, this value is populated by finding
all of the response headers used by the protocol, modeled in the
service, and used by auth schemes.allowedHeaders is set to "*" to allow all headers IFF
the service does not use HTTP credentials, and no value is provided
to the additionalAllowedHeaders property of the Smithy
cors trait. Otherwise, this value is populated by finding
all of the request headers used by the protocol, modeled in the
service, and used by auth schemes.allowCredentials is set to true if any of the
auth schemes used in the API use HTTP credentials according
to Context.usesHttpCredentials().| Constructor and Description |
|---|
CorsHttpIntegration() |
| Modifier and Type | Method and Description |
|---|---|
OpenApi |
after(Context<? extends Trait> context,
OpenApi openapi)
Updates an OpenApi object after it is built.
|
java.util.List<ApiGatewayConfig.ApiType> |
getApiTypes()
Gets the types of API Gateway APIs that this mapper applies to.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrapbefore, compose, getOrder, postProcessOperation, updateDefaultSettings, updateNode, updateOperation, updateParameter, updatePathItem, updateRequestBody, updateResponse, updateSecurity, updateSecuritySchemepublic java.util.List<ApiGatewayConfig.ApiType> getApiTypes()
ApiGatewayMapperReturn an empty list or null to apply to all possible API types
other than ApiGatewayConfig.ApiType.DISABLED. However, note
that it's typically safer to specify the exact API types that the
mapper supports.
getApiTypes in interface ApiGatewayMapperpublic OpenApi after(Context<? extends Trait> context, OpenApi openapi)
OpenApiMapperafter in interface OpenApiMappercontext - Conversion context.openapi - OpenAPI object to modify.