-
Notifications
You must be signed in to change notification settings - Fork 45
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
[ProvisioningStateMustBeReadOnly] Rule ignores siblings of $ref #637
Comments
I saw this discussed in Azure/azure-sdk-tools#6191. The solution was to add options:
"@azure-tools/typespec-autorest":
azure-resource-provider-folder: "resource-manager"
emitter-output-dir: "{project-root}/.."
examples-directory: examples
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/vmware.json"
omit-unreachable-types: true
use-read-only-status-schema: true |
This should be fixed in coordination wtih Azure/oav#848. OverviewThe rule is a "false positive" from the perspective of autorest, but it's correct from the perspective of OpenAPI 2.0. Siblings of $ref are allowed in the former, but ignored in the latter (#706). Spectral
azure-openapi-validator/packages/rulesets/src/spectral/az-arm.ts Lines 208 to 221 in d372289
It's probably ignoring the Relevant unit test from spectral: Convert to NativeOtherwise, this rule could be converted from spectral to native, which should be able to allow siblings of DocumentationUntil fixed, we should improve the documentation:
|
@markcowl: How would you characterize setting Put another way, if the bugs in |
I am working on https://github.com/Azure/azure-rest-api-specs-pr/pull/15631 and there are many instances of
ProvisioningStateMustBeReadOnly
errors that are false positives.https://github.com/Azure/azure-rest-api-specs-pr/pull/15631/checks?check_run_id=19650955197
All of the
provisioningState
s are marked asreadOnly
, for example:I see this test was considered flaky before in #561. cc @AkhilaIlla
The text was updated successfully, but these errors were encountered: