Skip to content

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

Open
@Xavier-Redondo

Description

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions