-
Notifications
You must be signed in to change notification settings - Fork 742
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 rules #1751
Linter Validation rules #1751
Changes from all commits
7fc7d03
aa24132
abad3fd
876787a
f2a0b54
3606a82
eea33c1
63770af
ab73fdf
efc0890
fb5b638
d781245
bcd2366
00426cb
6d9d811
d3769c9
4506ec7
2630213
ffd031a
22b4a27
81d7efd
c943203
312b726
d9760e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,6 +195,41 @@ | |
<data name="MsdnReferencesDiscouraged" xml:space="preserve"> | ||
<value>For better generated code quality, remove all references to "msdn.microsoft.com".</value> | ||
</data> | ||
<data name="APIVersionFormatIsNotValid" xml:space="preserve"> | ||
<value>API Version must be in the format: yyyy-MM-dd, optionally followed by -preview, -alpha, -beta, -rc, -privatepreview.</value> | ||
</data> | ||
<data name="HttpVerbIsNotValid" xml:space="preserve"> | ||
<value>Permissible values for HTTP Verb are delete,get,put,patch,head,options,post. </value> | ||
</data> | ||
<data name="ResourceModelIsNotValid" xml:space="preserve"> | ||
<value>The id, name, type, location and tags properties of the Resource must be present with id, name and type as read-only</value> | ||
</data> | ||
<data name="ResourceIsMsResourceNotValid" xml:space="preserve"> | ||
<value>A 'Resource' definition must have x-ms-azure-resource extension enabled and set to true.</value> | ||
</data> | ||
<data name="XmsClientNameInValid" xml:space="preserve"> | ||
<value>Value of 'x-ms-client-name' cannot be the same as the property/model name.</value> | ||
</data> | ||
<data name="DeleteMustHaveEmptyRequestBody" xml:space="preserve"> | ||
<value>'Delete' operation cannot have parameters in the request body.</value> | ||
</data> | ||
<data name="SkuModelIsNotValid" xml:space="preserve"> | ||
<value>Sku Model is not valid. A Sku model must have name property. It can also have tier, size, family, capacity as optional properties.</value> | ||
</data> | ||
<data name="PutGetPatchResponseInvalid" xml:space="preserve"> | ||
<value>{0} has different responses for PUT/GET/PATCH operations. The PUT/GET/PATCH operations must have same schema response.</value> | ||
</data> | ||
<data name="OperationsAPINotImplemented" xml:space="preserve"> | ||
<value>Operations API must be implemented for the service.</value> | ||
</data> | ||
<data name="TrackedResourceIsNotValid" xml:space="preserve"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This rule does not accurately represent whether the tracked resource is valid or not. So the rule name /description can be misleading. Ex- The listByResourceGroup and listBySubscription need not be present for tracked nested resources. So we should Run 2. and 3. checks only for tracked parents. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Synched and cleared offline |
||
<value>Tracked Resource failing validation is: {0}. Validation Failed: {1}. | ||
A 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.</value> | ||
</data> | ||
<data name="BodyMustHaveSchema" xml:space="preserve"> | ||
<value>Each body parameter must have a schema</value> | ||
</data> | ||
|
@@ -273,6 +308,9 @@ | |
<data name="PathCannotBeNullOrEmpty" xml:space="preserve"> | ||
<value>path cannot be null or an empty string or a string with white spaces while getting the parent directory</value> | ||
</data> | ||
<data name="GuidUsageNotRecommended" xml:space="preserve"> | ||
<value>Guid used at the #/Definitions/{1}/.../{0}. Usage of Guid is not recommanded. If GUIDs are absolutely required in your service, please get sign off from the Azure API review board.</value> | ||
</data> | ||
<data name="OperationNameNotValid" xml:space="preserve"> | ||
<value>'GET' operation must use method name 'Get' or Method name start with 'List', 'PUT' operation must use method name 'Create', 'PATCH' operation must use method name 'Update' and 'DELETE' operation must use method name 'Delete'.</value> | ||
</data> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule does not accurately represent whether the tracked resource is valid or not. So the rule name /description can be misleading. Ex- The listByResourceGroup and listBySubscription need not be present for tracked nested resources. So we should Run 2. and 3. checks only for tracked parents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Synched and cleared offline