Class CorsHttpIntegration
- java.lang.Object
- 
- software.amazon.smithy.aws.apigateway.openapi.CorsHttpIntegration
 
- 
- All Implemented Interfaces:
- ApiGatewayMapper,- OpenApiMapper
 
 public final class CorsHttpIntegration extends java.lang.Object implements ApiGatewayMapper Adds support for the API Gatewayx-amazon-apigateway-corsextension for API Gateway HTTP APIs using values from the Smithycorstrait.- allowOriginsis populated based on the- originproperty of the- corstrait.
- maxAgeis populated based on the- maxAgeproperty of the- corstrait.
- allowMethodsis populated by scanning the generated OpenAPI definition for every defined method.
- exposedHeadersis set to "*" to expose all headers IFF the service does not use HTTP credentials, and no value is provided to the- additionalExposedHeadersproperty of the Smithy- corstrait. 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.
- allowedHeadersis set to "*" to allow all headers IFF the service does not use HTTP credentials, and no value is provided to the- additionalAllowedHeadersproperty of the Smithy- corstrait. 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.
- allowCredentialsis set to true if any of the auth schemes used in the API use HTTP credentials according to- Context.usesHttpCredentials().
 - See Also:
- API Gateway documentation
 
- 
- 
Constructor SummaryConstructors Constructor Description CorsHttpIntegration()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenApiafter(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.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface software.amazon.smithy.openapi.fromsmithy.OpenApiMapperbefore, getOrder, postProcessOperation, updateDefaultSettings, updateNode, updateOperation, updateParameter, updatePathItem, updateRequestBody, updateResponse, updateSecurity, updateSecurityScheme
 
- 
 
- 
- 
- 
Method Detail- 
getApiTypespublic java.util.List<ApiGatewayConfig.ApiType> getApiTypes() Description copied from interface:ApiGatewayMapperGets the types of API Gateway APIs that this mapper applies to.Return 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.- Specified by:
- getApiTypesin interface- ApiGatewayMapper
- Returns:
- Returns the list of API Gateway API types to apply to.
 
 - 
afterpublic OpenApi after(Context<? extends Trait> context, OpenApi openapi) Description copied from interface:OpenApiMapperUpdates an OpenApi object after it is built.- Specified by:
- afterin interface- OpenApiMapper
- Parameters:
- context- Conversion context.
- openapi- OpenAPI object to modify.
- Returns:
- Returns the updated OpenApi object.
 
 
- 
 
-