biocore / biocore/microsetta-private-api

'Lock down' api with additionalProperties and required

Open
#18 2 comments 0 reactions 1 assignee Claimed by @AmandaBirmingham View on GitHub
bug priority yaml
Dominant language
Python
Stars
6
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Go through microsetta_private_api.yaml and add `additionalProperties: false` to all schemas (including inputs and responses) that will NOT accept any properties not laid out in the api (which I think is all of them). Also add `required` sections to each schema (as was done with `address`) to indicate which fields MUST be present (see https://stackoverflow.com/a/45577763 for details on what `required` actually validates).

Test these additions by sending input json with too many or too few fields (NOT the examples in the yaml, which should all be valid) and see whether connexion correctly screams.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.