fix: example validation for readOnly/writeOnly properties#2521
fix: example validation for readOnly/writeOnly properties#2521
Conversation
🦋 Changeset detectedLatest commit: e0fc620 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
575613f to
fa04039
Compare
| type: string | ||
| example: my list | ||
| Category: | ||
| type: object |
There was a problem hiding this comment.
no idea why it started failing now, but it doesn't look valid
There was a problem hiding this comment.
Could you investigate how your chages inpacted that?
There was a problem hiding this comment.
it doesn't fail anymore, but left it like that
JSON schema allows to skip type
fbdacb4 to
1e4d00d
Compare
187f657 to
c2e8caf
Compare
753cc3c to
b6b0f67
Compare
| "@faker-js/faker": "^7.6.0", | ||
| "@noble/hashes": "^1.8.0", | ||
| "@redocly/ajv": "8.17.1", | ||
| "@redocly/ajv": "8.17.3", |
There was a problem hiding this comment.
Could you add a test for Respect too?
There was a problem hiding this comment.
i don't think it's necessary, respect filters out writeOnly / readOnly properties
6cde90f to
07cbb99
Compare
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1770901767 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/cli@0.0.0-snapshot.1770901767
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1770901767
# or
npm install @redocly/respect-core@0.0.0-snapshot.1770901767 |
|
added |
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1770913558 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/cli@0.0.0-snapshot.1770913558
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1770913558
# or
npm install @redocly/respect-core@0.0.0-snapshot.1770913558 |
What/Why/How?
TBD:
What
requiredwithreadOnly/writeOnlywhile validating request/response examples.required + readOnly→ required in responses, not allowed / not required in requestsrequired + writeOnly→ required in requests, not allowed / not required in responsesWhy
How
passContext: true(so Ajv keywords can accessthis).thiscontext containingapiContext?: 'request' | 'response' }soreadOnly/writeOnlyandrequiredbehave correctly per example location.Reference
Testing
required+readOnly/writeOnly.Screenshots (optional)
Check yourself
Security