$ref siblings #706
mikeharder
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The behavior of $ref sibling propeties varies across different spec versions:
Allowed - All Properties
Allowed - Selected Properties
Ignored
Mixing specifications from one bucket, with tools from another bucket, may be problematic.
For example, given this spec:
The
readonlyproperty may be ignored or included, depending on the spec version.Tools
The behavior also varies across the tools used in the azure-rest-api-specs repo.
azure-openapi-validator
Unit test ensuring it ignores
$refsiblings:azure-openapi-validator/packages/rulesets/src/spectral/test/provisioning-state-must-be-read-only.test.ts
Line 215 in cd5b31b
azure-openapi-validator/packages/rulesets/src/spectral/test/provisioning-state-must-be-read-only.test.ts
Lines 261 to 280 in cd5b31b
oav
READONLY_PROPERTY_NOT_ALLOWED_IN_REQUESTignores$refsiblings: Azure/oav#1063@apidevtools/json-schema-ref-parser
$RefParser.dereference()preserves$refsiblings:https://github.com/mikeharder/ref-siblings/blob/6b989b296dbc3fc51a55cfd464251918435de4e1/test.js#L26-L43
ajv
ajv.validate()has 3 options forextendRefs:true,"ignore", and"fail"https://github.com/mikeharder/ref-siblings/blob/6b989b296dbc3fc51a55cfd464251918435de4e1/test.js#L46-L64
Related
oavnot throwing expected READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST oav#1063Beta Was this translation helpful? Give feedback.
All reactions