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

Fixed an issue where schemas under allOf keyword having additionalProperties set to false were not generating bodies correctly. #787

Merged
merged 1 commit into from Mar 27, 2024

Conversation

VShingala
Copy link
Member

@VShingala VShingala commented Mar 26, 2024

Overview

Issue reported by user: #417 (comment)

RCA

Issue was with merging schemas under allOf, specifically having additionalProperties: false. Third-party library (https://github.com/mokkabonna/json-schema-merge-allof) used for this purpose was defaulting to resolving no properties in such case leaving the resolved schema body empty.

Fix

We'll be using suggested option ignoreAdditionalProperties as true in such cases. This makes sure that we're keeping request data from schemas underlying allOf keywords correctly instead of considering additionalProperties in one of schema.

See more about this option here: https://github.com/mokkabonna/json-schema-merge-allof?tab=readme-ov-file#options

…perties set to false were not generating bodies correctly
@VShingala VShingala merged commit ae1bf3e into develop Mar 27, 2024
6 checks passed
Sign up for free to 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.

None yet

2 participants