pactflow / swagger-mock-validator

Other
13 stars 4 forks source link

`additionalProperties: true` should not be allowed #55

Closed mefellows closed 2 weeks ago

mefellows commented 2 weeks ago

The following comparison fails with additional properties set to false: https://github.com/gnanendra-bogireddy/pactflow-compatibility-check.

Change additionalProperties: true and the tests pass.

This should not be allowed. See also https://github.com/pactflow/swagger-mock-validator/pull/38.

github-actions[bot] commented 2 weeks ago

👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-2099). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.

See our documentation for more information.

mefellows commented 2 weeks ago

Actually, this is not a bug.

Additional properties on the request body are not problematic and shouldn't cause this to fail, and is a violation of Postel's law. Standard semantics of additionalProperties are retained in this tool.