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

Correct the handling of additionalProperties in OpenAPI (2.x) #3636

Merged
merged 2 commits into from
Nov 16, 2021
Merged

Correct the handling of additionalProperties in OpenAPI (2.x) #3636

merged 2 commits into from
Nov 16, 2021

Conversation

tjquinno
Copy link
Member

Resolves #3624 for 2.x

The earlier handling for additionalProperties in OpenAPI was flawed. The additionalProperties setting in an OpenAPI document can be either boolean or a schema.

The MP OpenAPI Schema class exposes additional properties as getters and setters for additionalProperties (now deprecated), additionalPropertiesBoolean, and additionalPropertiesSchema.

This situation presents some challenges for serializing and deserializing OpenAPI documents and the earlier code did not do this correctly through its customizations to the SnakeYAML parsing and rendering.

This PR fixes those problems and adds more tests for both input and output.

@tjquinno tjquinno added this to the 2.4.1 milestone Nov 11, 2021
@tjquinno tjquinno self-assigned this Nov 11, 2021
@tjquinno tjquinno merged commit 5dd2d34 into helidon-io:helidon-2.x Nov 16, 2021
@tjquinno tjquinno deleted the openapi-addprops branch November 16, 2021 15:52
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.

2 participants