You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Property dependentRequired is not expected here is reported when running the linter. I would expect for an OpenAPI 3.1.0 spec for this to lint and be reflected in the UI generated as it seems to be part of the supported JSON Schema dialect.T
To Reproduce
Steps to reproduce the behavior:
Given this redocly.yaml file
# See https://redocly.com/docs/cli/configuration/ for more information.
extends:
- recommended
rules:
no-unused-components: error
no-server-example.com: off
no-empty-servers: off
security-defined: off
info-license: off
operation-4xx-response: off # https://phab.easypo.net/T72078 turn this back on when 4xx are added.
theme:
openapi:
htmlTemplate: ./docs/index.html
theme:
colors:
primary:
main: "#32329f"
generateCodeSamples:
languages: # Array of language config objects; indicates in which languages to generate code samples.
- lang: curl
openapi: 3.1.0
info:
version: 1.0.0
title: This is only a test.
description: testing
paths:
'/test':
post:
summary: test use of dependentRequired
operationId: test
responses:
"200":
description: "OK"
content:
application/json:
schema:
type: object
properties:
name:
type: string
credit_card:
type: number
billing_address:
type: string
required:
- name
dependentRequired:
credit_card:
- billing_address
Run this command with these arguments... redocly ...
`redocly lint openapi.yaml
See error
❯ redocly lint openapi.yaml
(node:45032) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
validating openapi.yaml...
[1] openapi.yaml:27:17 at #/paths/~1test/post/responses/200/content/application~1json/schema/dependentRequired
Property `dependentRequired` is not expected here.
25 | required:
26 | - name
27 | dependentRequired:
28 | credit_card:
29 | - billing_address
Error was generated by the spec rule.
openapi.yaml: validated in 7ms
❌ Validation failed with 1 error.
run `redocly lint --generate-ignore-file` to add all problems to the ignore file.
Expected behavior
The lint should pass.
Logs
n/a
OpenAPI description
Included above.
Redocly Version(s)
1.12.2
Node.js Version(s)
21.6.2
Additional context
I have tried to double check that it's not just a formatting error but this looks to be correct according the the json schema doc and is not a linting error when running spectral
The text was updated successfully, but these errors were encountered:
Hey @jmacelroy! Thanks for reporting!
Meanwhile you can suppress the error by generating the ignore file: redocly lint openapi.yaml --generate-ignore-file to pass the validation.
BTW, what do you mean by '...prevents component from being available in UI'? Is it just linter failing and not passing to the next step or you'd expect the dependentRequired key to somehow be rendered on the UI? If the latter, you should probably open an issue in the Redoc repository.
BTW, what do you mean by '...prevents component from being available in UI'? Is it just linter failing and not passing to the next step or you'd expect the dependentRequired key to somehow be rendered on the UI? If the latter, you should probably open an issue in the Redoc repository.
Describe the bug
Property
dependentRequired
is not expected here is reported when running the linter. I would expect for an OpenAPI 3.1.0 spec for this to lint and be reflected in the UI generated as it seems to be part of the supported JSON Schema dialect.TTo Reproduce
Steps to reproduce the behavior:
redocly.yaml
fileRun this command with these arguments...
redocly ...
`redocly lint openapi.yaml
See error
Expected behavior
The lint should pass.
Logs
n/a
OpenAPI description
Included above.
Redocly Version(s)
1.12.2
Node.js
Version(s)21.6.2
Additional context
I have tried to double check that it's not just a formatting error but this looks to be correct according the the json schema doc and is not a linting error when running spectral
The text was updated successfully, but these errors were encountered: