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

Scope conflict detection more narrowly in JSONSchema conversion #978

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

adamthom-amzn
Copy link
Contributor

Description of changes:
When creating JSONSchema from a Smithy model, any two conflicting shapes with
the same unqualified name would cause the process to fail, when in most cases
the conflict is only important if it occurs between two shapes connected to
the service in question.

CloudFormation resource schema generation must consider additional shapes
via @cfnResource's additionalSchemas property. This property is read by
the CFN index and subsequently discarded, so I simply disabled the more
narrowly-scoped conflict detection for CFN specifically. This can be removed
once shapes can be connected directly to a service.

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

When creating JSONSchema from a Smithy model, any two conflicting shapes with
the same unqualified name would cause the process to fail, when in most cases
the conflict is only important if it occurs between two shapes connected to
the service in question.

CloudFormation resource schema generation must consider additional shapes
via @cfnResource's additionalSchemas property. This property is read by
the CFN index and subsequently discarded, so I simply disabled the more
narrowly-scoped conflict detection for CFN specifically. This can be removed
once shapes can be connected directly to a service.
@adamthom-amzn adamthom-amzn requested a review from a team November 12, 2021 01:26
@adamthom-amzn adamthom-amzn merged commit 194ba4e into smithy-lang:main Nov 12, 2021
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