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

Fix OpenAPI tag configuration #570

Merged
merged 1 commit into from
Sep 16, 2020
Merged

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Sep 16, 2020

Fixes bug in OpenAPI tag configuration where tags were not passed through without being explicitly set in the list of supported tags.

The corrected behavior for each smithy-build.json config:

  • Passes through all tags:
{
    "version": "1.0",
    "plugins": {
        "openapi": {
            "service": "smithy.example#Weather",
            "tags": true
        }
    }
}
  • Passes through only tags that have been configured as supported (e.g. foo and bar):
{
    "version": "1.0",
    "plugins": {
        "openapi": {
            "service": "smithy.example#Weather",
            "tags": true,
            "supportedTags": ["foo", "bar"]
        }
    }
}
  • Does not pass through tags, as list of supported tags is empty:
    "version": "1.0",
    "plugins": {
        "openapi": {
            "service": "smithy.example#Weather",
            "tags": true,
            "supportedTags": []
        }
    }
}

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

@srchase srchase merged commit 9806893 into smithy-lang:master Sep 16, 2020
@srchase srchase deleted the openapi-tags branch September 16, 2020 21:40
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