-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
fix: nested refs #478
fix: nested refs #478
Conversation
fe74f69
to
516b538
Compare
if (key === '$ref') { | ||
jsonSchema[key] = `#/definitions/${jsonSchema[key]}` | ||
} else if (key === 'examples' && Array.isArray(jsonSchema[key]) && (jsonSchema[key].length > 1)) { | ||
jsonSchema.examples = convertExamplesArrayToObject(jsonSchema.examples) |
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.
Is this case tested?
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.
not at the moment, I'm not sure why the code is handing examples
. Should it be tested, or removed?
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.
We landed the #472 PR
is this needed?
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.
I'd say, this PR is still needed as this PR takes care of both Swagger and OpenAPI, that otehr PR only takes care of OpenAPI?
Does another test need to be added for when the user does not tweak buildLocalReference
, or is returning the $id now preferred?
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.
closed in favour of #479
516b538
to
4de83a3
Compare
closed in favour of #479 |
Start work towards #462
TBC:
buildLocalReference
?t.equal(definitions['def-3'].properties.b.$ref, '#/definitions/schemaB')
, vst.equal(definitions['def-3'].properties.b.$ref, '#/definitions/def-2')
?key === 'examples'
in the swagger spec?Checklist
npm run test
andnpm run benchmark
and the Code of conduct