-
Notifications
You must be signed in to change notification settings - Fork 47
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
The BodyTopLevelProperties rule is mistakenly flagging paged responses #722
Comments
I am facing same issue: Azure/azure-rest-api-specs#29961 |
I'm facing the same issue on my PR https://github.com/Azure/azure-rest-api-specs-pr/pull/19036 |
Facing same issue in https://github.com/Azure/azure-rest-api-specs-pr/pull/18985 |
Facing the same issue in https://github.com/Azure/azure-rest-api-specs-pr/pull/18871 |
* Initial 2024-06-01-preview changes * Match breaking change fixes * remove redundant file * Compile changes * style/linter fixes * Add replica promotion and geo-replica scenario * Linter/style fixes * Fixes * Fix: Spellcheck, ModelValidation, Advocado * Fix promote async action, fix promote example, add reset password example. * Add examples * Fix examples * Fix more examples * prettier fixes * Fix LintDiff warnings * Fixes * Fix example * Update npm and redo tsv * Changes * address comments * update scenario file * Finalize basic scenario * Add suppression for Azure/azure-openapi-validator#722 * Fix supression * Fix typespec validations * Override go SDK for MongoClusterStatus * Convert to new AutoRest suppressions format. * Update readme.md --------- Co-authored-by: Roopesh Manda <[email protected]>
facing the same issue: https://github.com/Azure/azure-rest-api-specs-pr/pull/19088 |
* Initial 2024-06-01-preview changes * Match breaking change fixes * remove redundant file * Compile changes * style/linter fixes * Add replica promotion and geo-replica scenario * Linter/style fixes * Fixes * Fix: Spellcheck, ModelValidation, Advocado * Fix promote async action, fix promote example, add reset password example. * Add examples * Fix examples * Fix more examples * prettier fixes * Fix LintDiff warnings * Fixes * Fix example * Update npm and redo tsv * Changes * address comments * update scenario file * Finalize basic scenario * Add suppression for Azure/azure-openapi-validator#722 * Fix supression * Fix typespec validations * Override go SDK for MongoClusterStatus * Convert to new AutoRest suppressions format. * Update readme.md --------- Co-authored-by: Roopesh Manda <[email protected]>
Same issue here: Azure/azure-rest-api-specs#30271 |
I am facing same issue Azure/azure-rest-api-specs#30293 |
how to suppress this issue or make it optional ? |
Fixed by #729 |
Fix #729 requires the path after the last azure-openapi-validator/packages/rulesets/src/native/utilities/rules-helper.ts Lines 140 to 152 in c26c69a
Which fixed cases like this: However, we have an example of a spec with an odd number of path segments instead: Should the rule be fixed to allow this path? Or is the rule correct, and the spec should be updated to use an even number of path segments? |
Describe the bug
The BodyTopLevelProperties check is incorrectly flagging the response in List operations, which rturn a page of data as if they were resource GET operations. There are several examples in this PR: https://github.com/Azure/azure-rest-api-specs-pr/pull/18696
To Reproduce
Steps to reproduce the behavior:
Create list operations like: https://github.com/Azure/azure-rest-api-specs-pr/blob/a6bade603572212620a6cbb906f400e19d899b1b/specification/edge/resource-manager/Microsoft.Edge/configurationmanager/preview/2024-06-01-preview/configurationmanager.json#L62-L99
Expected behavior
This check should not be applied to list operations at all - in ARM specs, having an odd number of PATH segments and a last segment that is not a path variable should prevent the rule from being applied
Screenshots
See the link above.
Desktop (please complete the following information):
n/a, this occurs in CI
Additional context
The text was updated successfully, but these errors were encountered: