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

Reduce HttpBindingsMissing severity for non-REST services #1044

Merged

Conversation

adamthom-amzn
Copy link
Contributor

Description of changes:
HttpBindingsMissing emits an ERROR event for all services that have
inconsistently @http traited operations, but not all protocols support @http.
This change inspects the list of supported traits for every protocol trait
applied to the service, and if none of them support the http trait, then
HttpBindingsMissing is emitted at WARNING, instead of ERROR.

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

@adamthom-amzn adamthom-amzn requested a review from a team January 8, 2022 00:54
.collect(Collectors.toList());
}

// Only emit ERROR events if any of the protocols for the service support HTTP traits
private Severity determineSeverity(ServiceShape service, Model model) {
if (service.getAllTraits().values()
Copy link
Member

Choose a reason for hiding this comment

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

HttpBindingsMissing emits an ERROR event for all services that have
inconsistently @http traited operations, but not all protocols support @http.
This change inspects the list of supported traits for every protocol trait
applied to the service, and if none of them support the http trait, then
HttpBindingsMissing is emitted at WARNING, instead of ERROR.
@adamthom-amzn adamthom-amzn force-pushed the http-bindings-missing-severity branch from c2005f3 to 291ea26 Compare January 10, 2022 17:38
@adamthom-amzn adamthom-amzn merged commit b46770f into smithy-lang:main Jan 10, 2022
@adamthom-amzn adamthom-amzn deleted the http-bindings-missing-severity branch January 10, 2022 17:45
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