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

Linter Validation: The rule for TrackedResourceValidation should be broken down into individual rules #1860

Closed
ravbhatnagar opened this issue Feb 21, 2017 · 3 comments
Assignees
Labels
P1 - Required Required functionality - not blocking

Comments

@ravbhatnagar
Copy link

Currently the following error is given out -
"WARNING: TrackedResourceValidation - Tracked Resource failing validation is: Application. Validation Failed: 2. 
Tracked Resource must have:
   1. A Get Operation
   2. A ListByResourceGroup operation with x-ms-pageable extension and
   3. A ListBySubscriptionId operation with x-ms-pageable extension.
   4. Type, Location, Tags should not be used in the properties."

IMO, there are already rules for each individual items listed above. So the violation message should be given separately for each of the above.

@ravbhatnagar ravbhatnagar added P1 - Required Required functionality - not blocking linter-rule labels Feb 21, 2017
@veronicagg
Copy link
Contributor

Let's remove #1, because we already have rule M3027, rest need to be split in separate rules
#2 and #3, should be applied to models only from responses.
#4 should be applied to all tracked resources, not just the ones in responses, the rule should just be applied in the first/top level of "properties".

@veronicagg
Copy link
Contributor

For the list case, we should be looking to see if the model definition is being used by another model which builds the list, and that list "model" is returned by any operations, example having "Model1" and Model1_ListResult", so "Model1_ListResult" is the model returned by the list operation, which lists all "Model1" objects.

@veronicagg veronicagg modified the milestone: Linter bug fixing Mar 10, 2017
@sarangan12
Copy link
Contributor

#2087 Task completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 - Required Required functionality - not blocking
Projects
None yet
Development

No branches or pull requests

3 participants