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

swagger additionalProperties: add test coverage and document current behaviour #70

Open
Xavier-Redondo opened this issue Jan 30, 2023 · 0 comments

Comments

@Xavier-Redondo
Copy link
Contributor

Xavier-Redondo commented Jan 30, 2023

This issue has two parts:

Testing coverage

Add relevant tests to know how bauta behaves in relation to input request fields that are not in the swagger.

This is related to swagger additionalProperties field, which can be true or false, where this is used (top root object or a child object in an array.

The coverage in the tests should take into account this and at least should have coverage for default values (nothing at swagger level) and when that field is set.

At this point we think that this behaviour is common in bautajs-core, but this could be not true, check bautajs-fastify and bautajs-express to be sure.

Documentation

Add a section at the end of validation.md called additionalProperties and extra input fields not in the swagger where the behaviour is explained according to the different values in the swagger of additionalProperties.

Note: in this task the current behaviour of bauta should not be modified. Instead, if a change/improvement has to be done open an issue for version 3.x.

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

No branches or pull requests

1 participant