diff --git a/config/spotless/formatting.xml b/config/spotless/formatting.xml
index b2a696360ee..9c93ae8a0e6 100644
--- a/config/spotless/formatting.xml
+++ b/config/spotless/formatting.xml
@@ -363,7 +363,8 @@
-
+
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddAuthorizers.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddAuthorizers.java
index ec16e592a8c..181ce79dc28 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddAuthorizers.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddAuthorizers.java
@@ -64,7 +64,8 @@ public Map> updateSecurity(
Context extends Trait> context,
Shape shape,
SecuritySchemeConverter extends Trait> converter,
- Map> requirement) {
+ Map> requirement
+ ) {
// Only modify requirements that exactly match the updated scheme.
if (requirement.size() != 1
|| !requirement.keySet().iterator().next().equals(converter.getOpenApiAuthSchemeName())) {
@@ -87,7 +88,8 @@ public OperationObject updateOperation(
OperationShape shape,
OperationObject operation,
String httpMethodName,
- String path) {
+ String path
+ ) {
ServiceShape service = context.getService();
AuthorizerIndex authorizerIndex = AuthorizerIndex.of(context.getModel());
@@ -142,7 +144,8 @@ public OpenApi after(Context extends Trait> context, OpenApi openapi) {
private OpenApi addComputedAuthorizers(
Context extends Trait> context,
OpenApi openApi,
- AuthorizersTrait trait) {
+ AuthorizersTrait trait
+ ) {
OpenApi.Builder builder = openApi.toBuilder();
ComponentsObject.Builder components = openApi.getComponents().toBuilder();
@@ -167,7 +170,8 @@ private OpenApi addComputedAuthorizers(
private boolean isAuthConverterMatched(
Context extends Trait> context,
SecuritySchemeConverter extends Trait> converter,
- ShapeId scheme) {
+ ShapeId scheme
+ ) {
return converter.getAuthSchemeId().equals(scheme)
&& context.getService().hasTrait(converter.getAuthSchemeType());
}
@@ -176,7 +180,8 @@ private SecurityScheme convertAuthScheme(
Context extends Trait> context,
SecuritySchemeConverter converter,
AuthorizerDefinition authorizer,
- String authorizerName) {
+ String authorizerName
+ ) {
T authTrait = context.getService().expectTrait(converter.getAuthSchemeType());
SecurityScheme createdScheme = converter.createSecurityScheme(context, authTrait);
SecurityScheme.Builder schemeBuilder = createdScheme.toBuilder();
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsPreflightIntegration.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsPreflightIntegration.java
index 14bc2327155..f68adfdbdeb 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsPreflightIntegration.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsPreflightIntegration.java
@@ -81,7 +81,8 @@ private static PathItem addPreflightIntegration(
Context extends Trait> context,
String path,
PathItem pathItem,
- CorsTrait corsTrait) {
+ CorsTrait corsTrait
+ ) {
// Filter out any path for which an OPTIONS handler has already been defined
if (pathItem.getOptions().isPresent()) {
LOGGER.fine(() -> path + " already defines an OPTIONS request, so no need to generate CORS-preflight");
@@ -99,7 +100,8 @@ private static Map deduceCorsHeaders(
Context context,
String path,
PathItem pathItem,
- CorsTrait corsTrait) {
+ CorsTrait corsTrait
+ ) {
Map corsHeaders = new HashMap<>();
corsHeaders.put(CorsHeader.MAX_AGE, String.valueOf(corsTrait.getMaxAge()));
corsHeaders.put(CorsHeader.ALLOW_ORIGIN, corsTrait.getOrigin());
@@ -153,7 +155,8 @@ private static Map deduceCorsHeaders(
private static Set getSecuritySchemeRequestHeaders(
Context extends Trait> context,
- SecuritySchemeConverter converter) {
+ SecuritySchemeConverter converter
+ ) {
T t = context.getService().expectTrait(converter.getAuthSchemeType());
return converter.getAuthRequestHeaders(context, t);
}
@@ -179,7 +182,8 @@ private static OperationObject createPreflightOperation(
Context extends Trait> context,
String path,
PathItem pathItem,
- Map headers) {
+ Map headers
+ ) {
return OperationObject.builder()
.tags(ListUtils.of("CORS"))
.security(Collections.emptyList())
@@ -226,7 +230,8 @@ private static ResponseObject createPreflightResponse(Map he
private static ObjectNode createPreflightIntegration(
Context extends Trait> context,
Map headers,
- PathItem pathItem) {
+ PathItem pathItem
+ ) {
IntegrationResponse.Builder responseBuilder = IntegrationResponse.builder().statusCode("200");
// Add each CORS header to the mock integration response.
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsResponseHeaders.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsResponseHeaders.java
index 6c88df7fe26..6986461772c 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsResponseHeaders.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsResponseHeaders.java
@@ -44,7 +44,8 @@ public OperationObject postProcessOperation(
OperationShape shape,
OperationObject operation,
String method,
- String path) {
+ String path
+ ) {
return context.getService()
.getTrait(CorsTrait.class)
.map(trait -> addCorsHeadersToResponses(context, shape, operation, method, trait))
@@ -56,7 +57,8 @@ private OperationObject addCorsHeadersToResponses(
OperationShape shape,
OperationObject operationObject,
String method,
- CorsTrait trait) {
+ CorsTrait trait
+ ) {
OperationObject.Builder builder = operationObject.toBuilder();
for (Map.Entry entry : operationObject.getResponses().entrySet()) {
@@ -79,7 +81,8 @@ private ResponseObject createUpdatedResponseWithCorsHeaders(
OperationObject operationObject,
String method,
CorsTrait trait,
- ResponseObject response) {
+ ResponseObject response
+ ) {
// Determine which headers have been added to the response.
List headers = new ArrayList<>();
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToGatewayResponses.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToGatewayResponses.java
index 88dd236dd0f..08e7c5f3ebc 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToGatewayResponses.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToGatewayResponses.java
@@ -88,7 +88,8 @@ private Node updateGatewayResponses(Context extends Trait> context, CorsTrait
private Node updateGatewayResponses(
Context extends Trait> context,
CorsTrait trait,
- ObjectNode gatewayResponses) {
+ ObjectNode gatewayResponses
+ ) {
Map corsHeaders = new HashMap<>();
corsHeaders.put(CorsHeader.ALLOW_ORIGIN, trait.getOrigin());
@@ -110,7 +111,8 @@ private ObjectNode updateGatewayResponse(
Context extends Trait> context,
CorsTrait trait,
Map sharedHeaders,
- ObjectNode gatewayResponse) {
+ ObjectNode gatewayResponse
+ ) {
ObjectNode responseParameters = gatewayResponse
.getObjectMember(RESPONSE_PARAMETERS_KEY)
.orElse(Node.objectNode());
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToRestIntegrations.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToRestIntegrations.java
index 42e6e5ed3fb..7bc83f5777a 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToRestIntegrations.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddCorsToRestIntegrations.java
@@ -51,7 +51,8 @@ public OperationObject updateOperation(
OperationShape shape,
OperationObject operationObject,
String httpMethod,
- String path) {
+ String path
+ ) {
CorsTrait cors = context.getService().getTrait(CorsTrait.class).orElse(null);
if (cors == null) {
@@ -69,7 +70,8 @@ private OperationObject updateOperation(
OperationShape shape,
OperationObject operationObject,
CorsTrait cors,
- ObjectNode integrationObject) {
+ ObjectNode integrationObject
+ ) {
ObjectNode updated = updateIntegrationWithCors(
context,
operationObject,
@@ -87,7 +89,8 @@ private ObjectNode updateIntegrationWithCors(
OperationObject operationObject,
OperationShape shape,
ObjectNode integrationNode,
- CorsTrait cors) {
+ CorsTrait cors
+ ) {
ObjectNode responses = integrationNode.getObjectMember(RESPONSES_KEY).orElse(Node.objectNode());
// Always include a "default" response that has the same HTTP response code.
@@ -132,7 +135,8 @@ private ObjectNode updateIntegrationResponse(
OperationShape shape,
Map corsHeaders,
Set deduced,
- ObjectNode response) {
+ ObjectNode response
+ ) {
Map responseHeaders = new HashMap<>(corsHeaders);
ObjectNode responseParams = response.getObjectMember(RESPONSE_PARAMETERS_KEY).orElseGet(Node::objectNode);
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddIntegrations.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddIntegrations.java
index b8df78b4bb1..3988bcbb062 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddIntegrations.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddIntegrations.java
@@ -41,7 +41,8 @@ public OperationObject updateOperation(
OperationShape shape,
OperationObject operation,
String httpMethod,
- String path) {
+ String path
+ ) {
IntegrationTraitIndex index = IntegrationTraitIndex.of(context.getModel());
return index.getIntegrationTrait(context.getService(), shape)
.map(trait -> operation.toBuilder()
@@ -62,7 +63,8 @@ static ObjectNode createIntegration(MockIntegrationTrait integration) {
private static ObjectNode createIntegration(
Context extends Trait> context,
OperationShape shape,
- Trait integration) {
+ Trait integration
+ ) {
ObjectNode integrationNode;
if (integration instanceof MockIntegrationTrait) {
integrationNode = integration.toNode().expectObjectNode().withMember("type", Node.from("mock"));
@@ -86,7 +88,8 @@ private static ObjectNode createIntegration(
private static void validateTraitConfiguration(
IntegrationTrait trait,
Context extends Trait> context,
- OperationShape operation) {
+ OperationShape operation
+ ) {
// For HTTP APIs, API Gateway requires that the payloadFormatVersion is set on integrations.
// https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-integration.html
// If the payloadFormatVersion has not been set on an integration and the apiGatewayType has been set to "HTTP",
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddRequestValidators.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddRequestValidators.java
index c78780e31dd..d1b90b1391d 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddRequestValidators.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/AddRequestValidators.java
@@ -57,7 +57,8 @@ public OperationObject updateOperation(
OperationShape shape,
OperationObject operation,
String httpMethod,
- String path) {
+ String path
+ ) {
return shape.getTrait(RequestValidatorTrait.class)
.map(RequestValidatorTrait::getValue)
.map(value -> operation.toBuilder().putExtension(REQUEST_VALIDATOR, value).build())
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/ApiGatewayMapper.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/ApiGatewayMapper.java
index 36eed9aa61f..d2eea9972ca 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/ApiGatewayMapper.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/ApiGatewayMapper.java
@@ -95,7 +95,8 @@ public OperationObject updateOperation(
OperationShape shape,
OperationObject operation,
String httpMethodName,
- String path) {
+ String path
+ ) {
return matchesApiType(context)
? delegate.updateOperation(context, shape, operation, httpMethodName, path)
: operation;
@@ -107,7 +108,8 @@ public OperationObject postProcessOperation(
OperationShape shape,
OperationObject operation,
String httpMethodName,
- String path) {
+ String path
+ ) {
return matchesApiType(context)
? delegate.postProcessOperation(context, shape, operation, httpMethodName, path)
: operation;
@@ -126,7 +128,8 @@ public ParameterObject updateParameter(
OperationShape operation,
String httpMethodName,
String path,
- ParameterObject parameterObject) {
+ ParameterObject parameterObject
+ ) {
return matchesApiType(context)
? delegate.updateParameter(context, operation, httpMethodName, path, parameterObject)
: parameterObject;
@@ -138,7 +141,8 @@ public RequestBodyObject updateRequestBody(
OperationShape operation,
String httpMethodName,
String path,
- RequestBodyObject requestBody) {
+ RequestBodyObject requestBody
+ ) {
return matchesApiType(context)
? delegate.updateRequestBody(context, operation, httpMethodName, path, requestBody)
: requestBody;
@@ -151,7 +155,8 @@ public ResponseObject updateResponse(
String status,
String httpMethodName,
String path,
- ResponseObject response) {
+ ResponseObject response
+ ) {
return matchesApiType(context)
? delegate.updateResponse(context, operation, status, httpMethodName, path, response)
: response;
@@ -168,7 +173,8 @@ public void before(Context extends Trait> context, OpenApi.Builder builder) {
public SecurityScheme updateSecurityScheme(
Context extends Trait> context,
Trait authTrait,
- SecurityScheme securityScheme) {
+ SecurityScheme securityScheme
+ ) {
return matchesApiType(context)
? delegate.updateSecurityScheme(context, authTrait, securityScheme)
: securityScheme;
@@ -179,7 +185,8 @@ public Map> updateSecurity(
Context extends Trait> context,
Shape shape,
SecuritySchemeConverter extends Trait> converter,
- Map> requirement) {
+ Map> requirement
+ ) {
return matchesApiType(context)
? delegate.updateSecurity(context, shape, converter, requirement)
: requirement;
diff --git a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/CorsHeader.java b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/CorsHeader.java
index 212ca6b0fae..5afcc6d1404 100644
--- a/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/CorsHeader.java
+++ b/smithy-aws-apigateway-openapi/src/main/java/software/amazon/smithy/aws/apigateway/openapi/CorsHeader.java
@@ -37,7 +37,8 @@ static Set deduceOperationResponseHeaders(
Context context,
OperationObject operationObject,
OperationShape shape,
- CorsTrait cors) {
+ CorsTrait cors
+ ) {
// The deduced response headers of an operation consist of any headers
// returned by security schemes, any headers returned by the protocol,
// and any headers explicitly modeled on the operation.
diff --git a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTraitValidator.java b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTraitValidator.java
index 7db17edbb8d..82653c884b1 100644
--- a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTraitValidator.java
+++ b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTraitValidator.java
@@ -58,7 +58,8 @@ private List validate(Model model, ServiceShape service) {
private Optional validateAuthSchema(
Map authorizers,
Model model,
- ServiceShape service) {
+ ServiceShape service
+ ) {
Set authSchemes = ServiceIndex.of(model).getAuthSchemes(service).keySet();
String invalidMappings = authorizers.entrySet()
@@ -89,7 +90,8 @@ private Optional validateAuthSchema(
*/
private Optional validateEnableSimpleResponsesConfig(
Map authorizers,
- ServiceShape service) {
+ ServiceShape service
+ ) {
String invalidConfigs = authorizers.entrySet()
.stream()
.filter(entry -> entry.getValue().getEnableSimpleResponses().isPresent())
diff --git a/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResource.java b/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResource.java
index dbe0c1ffefe..d1a055beb0b 100644
--- a/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResource.java
+++ b/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResource.java
@@ -222,7 +222,8 @@ public Builder putPropertyDefinition(String propertyName, CfnResourceProperty de
public Builder updatePropertyDefinition(
String propertyName,
- Function updater) {
+ Function updater
+ ) {
CfnResourceProperty definition = propertyDefinitions.get(propertyName);
// Don't update if we don't have a property or it's already locked.
diff --git a/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndex.java b/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndex.java
index 297570490e1..fc72dc1eb14 100644
--- a/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndex.java
+++ b/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndex.java
@@ -200,7 +200,8 @@ private boolean identifierIsInherited(String identifier, Set pare
private void setIdentifierMutabilities(
CfnResource.Builder builder,
ResourceShape resource,
- Set parentResources) {
+ Set parentResources
+ ) {
Set defaultIdentifierMutability = getDefaultIdentifierMutabilities(resource);
resource.getIdentifiers().forEach((name, shape) -> {
@@ -239,7 +240,8 @@ private List