Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versioning for API Gateway defaults #1916

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Aug 10, 2023

This PR adds versioning to manage API Gateway defaults.

By default, API Gateway conversions will use defaults of version 2023-08-11 which will set the following OpenAPI config options:

  • alphanumericOnlyRefs: true
  • disabledFeatures: [default]
  • disableDefaultValues: true
  • disableIntegerFormat: true

All of these can be disabled by setting apiGatewayDefaults to disabled in smithy-build.json:

{
    "version": "1.0",
    "plugins": {
        "openapi": {
            "service": "example.weather#Weather",
            "protocol": "aws.protocols#restJson1",
            "apiGatewayDefaults": "DISABLED"
        }
    }
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@srchase srchase requested a review from a team as a code owner August 10, 2023 21:48
@srchase srchase force-pushed the remove-apigateway-defaulting branch from 984e1ba to 9681f58 Compare August 11, 2023 20:32
@srchase srchase changed the title Make disabling integer formats opt-in Add versioning for API Gateway defaults Aug 11, 2023
@srchase srchase force-pushed the remove-apigateway-defaulting branch from 9681f58 to 5d15edf Compare August 11, 2023 21:38
@srchase srchase force-pushed the remove-apigateway-defaulting branch 3 times, most recently from 94dbad0 to 31cfe93 Compare August 14, 2023 19:22
@srchase srchase force-pushed the remove-apigateway-defaulting branch 2 times, most recently from 234af66 to 5d05a9f Compare August 14, 2023 22:05
@@ -1176,6 +1176,40 @@ dependency on ``software.amazon.smithy:smithy-aws-apigateway-openapi``.
Amazon API Gateway configuration settings
=========================================

apiGatewayDefault (``string``)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to pluralize this

@srchase srchase force-pushed the remove-apigateway-defaulting branch from 5d05a9f to bb120e3 Compare August 15, 2023 16:21
@srchase srchase force-pushed the remove-apigateway-defaulting branch from bb120e3 to e42568a Compare August 15, 2023 17:15
@srchase srchase merged commit 8bd6303 into smithy-lang:main Aug 15, 2023
@srchase srchase deleted the remove-apigateway-defaulting branch August 15, 2023 17:43
alextwoods pushed a commit to alextwoods/smithy that referenced this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants