Skip to content
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

Build-in rule to detect schemas with type mismatch #1885

Closed
tatomyr opened this issue Feb 5, 2025 · 2 comments · Fixed by #1890
Closed

Build-in rule to detect schemas with type mismatch #1885

tatomyr opened this issue Feb 5, 2025 · 2 comments · Fixed by #1890

Comments

@tatomyr
Copy link
Contributor

tatomyr commented Feb 5, 2025

Is your feature request related to a problem? Please describe.

It's possible to define schemas of type object that contain the items field and vice versa. Such schemas don't make sense.

Image

Describe the solution you'd like

We need to add one more built-in rule that shows a warning for this case.

Describe alternatives you've considered

Doing nothing.

@jeremyfiel
Copy link
Contributor

these rules already exist thanks to Adam.

Redocly/redocly-cli-cookbook#33

@tatomyr
Copy link
Contributor Author

tatomyr commented Feb 10, 2025

@jeremyfiel yes, but we can do that better with a built-in rule. I expect to add more cases to this rule later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants