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

fix: async schema deserializer "additionalProperties" not deserializing JsonSchema correctly #120

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

UlrikSandberg
Copy link
Contributor

About the PR

Additional properties field of the async spec were experiencing a bug. Having the "additionalProperties" present caused the library to throw an Error as the MapNode didn't implement GetBooleanValueOrDefault and the code thus defaulted to the abstract ParseNode implementation which throw an exception.

This PR tries to cast the node to a ValueNode before calling GetBooleanValueOrDefault else the already existing behaviour.

Unit test to accommodate the change.

Changelog

  • Add: Fixed bug causing additionalProperties to cause an Error.
  • Remove: Removed bug causing additionalProperties to cause an Error.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you UlrikSandberg for your first pull request to AsyncAPI.NET repository. Please check out our contributors guide.

@UlrikSandberg UlrikSandberg changed the title Async schema deserializer "additonal properties" bug fixed. fix: async schema deserializer "additonal properties" bug fixed. Jul 11, 2023
@VisualBean VisualBean changed the title fix: async schema deserializer "additonal properties" bug fixed. fix: async schema deserializer "additional properties" bug fixed. Jul 11, 2023
@VisualBean VisualBean changed the title fix: async schema deserializer "additional properties" bug fixed. fix: async schema deserializer "additionalProperties" not deserializing JsonSchema correctly Jul 11, 2023
@VisualBean VisualBean merged commit 3761f52 into main Jul 11, 2023
@VisualBean VisualBean deleted the ulrik/additional_properties branch July 11, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants