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 references to operations and resources #310

Closed
wants to merge 4 commits into from

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Mar 12, 2020

This PR adds service references to all operations and resources in the test models for the following projects:

  • smithy-aws-traits
  • smithy-linters
  • smithy-model
  • smithy-mqtt-traits

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 kstich March 12, 2020 23:16
@mtdowling
Copy link
Member

Why?

@srchase
Copy link
Contributor Author

srchase commented Mar 13, 2020

Why?

This clears the way for adding a validator as described in #241

@kstich
Copy link
Contributor

kstich commented Mar 13, 2020

Why?

This clears the way for adding a validator as described in #241

Maybe the validator should only emit when a service shape exists in the model? If so, would we want something that emits when operations are found without a service at all?

@mtdowling
Copy link
Member

mtdowling commented Mar 13, 2020

Maybe the validator should only emit when a service shape exists in the model?

+1

If so, would we want something that emits when operations are found without a service at all?

I think it would be fine to find orphans with a shallow search. Is this operation referenced by a resource or service? Then don't emit. Is this resource referenced by a resource or service? Then don't emit. This would acheive the goal of detemining if an operation or resource is completely disconnected and forgotten to be bound somewhere. While it wouldn't tell you if an operation that's bound to a resource is disconnected from a service, it would tell you that it transitively is disconnected because the resouce it's connect to isn't bound to a service.

I don't think this change needs to be independent of the validator, and I don't think the validator needs to be added to master. Let's just add it to 0.10.

@srchase
Copy link
Contributor Author

srchase commented Mar 17, 2020

Updating models when introducing validator in #319.

@srchase srchase closed this Mar 17, 2020
@srchase srchase deleted the unreferenced-tests branch March 17, 2020 16:44
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.

3 participants