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

reitit.coercion.malli - invalid keys for :responses are accepted #667

Open
vemv opened this issue Mar 12, 2024 · 0 comments
Open

reitit.coercion.malli - invalid keys for :responses are accepted #667

vemv opened this issue Mar 12, 2024 · 0 comments

Comments

@vemv
Copy link

vemv commented Mar 12, 2024

I had been mistakenly using the following:

:responses {:200 {:body SomeMalliSchema}
            :500 {:body SomeOtherSchema}}

Where the mistake was using :200 instead of 200.

To make matters more confusing, :200 does work for Swagger schema emission. It's just coercion that expects strictly a 200 and ignores :200. It also happily accepts other invalid keys like :foo, 'bar, [1 2 3], etc.

I'd appreciate a stricter validation here - especially as it's a fairly crititical part of any Reitit-based system.

Thanks - V

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

No branches or pull requests

1 participant