Skip to content

[JSON Schema] Add additionalProperties (false) to the generated JSON schema - #3804

Merged
soyuka merged 1 commit into
api-platform:2.5from
alanpoulain:fix/json-schema-additional-properties-false
Nov 2, 2020
Merged

[JSON Schema] Add additionalProperties (false) to the generated JSON schema#3804
soyuka merged 1 commit into
api-platform:2.5from
alanpoulain:fix/json-schema-additional-properties-false

Conversation

@alanpoulain

@alanpoulainalanpoulain commented Oct 30, 2020

Copy link
Copy Markdown
Member
QA
Bug fix?yes/no
New feature?no
BC breaks?no
Deprecations?no
TicketsN/A
LicenseMIT
Doc PRN/A

This PR is part of a set of PR whose purpose is to make the assertions assertMatchesResourceItemJsonSchema and assertMatchesResourceCollectionJsonSchema work correctly.
The PR are:

It add additionalProperties (to false) to the definitions in order to not validate a schema if the validated object has additional properties (it could be another resource in this case).

@alanpoulain
alanpoulainforce-pushed the fix/json-schema-additional-properties-false branch from 91d95e7 to 3a3c2efCompareNovember 2, 2020 16:35
@soyuka
soyuka merged commit 1ef4176 into api-platform:2.5Nov 2, 2020
@soyuka

Copy link
Copy Markdown
Member

Thanks @alanpoulain

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@alanpoulain@soyuka