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

OpenApiSchema refactor to remove recursive keywords #1899

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

MaggieKimani1
Copy link
Contributor

This PR:

  • Removes the recursiveRef and recursiveAnchor keywords from our OpenApiSchema model as they're not supported in the latest JSON schema 2020-12 draft
  • Updates the Vocabulary property type in our model to represent a dictionary; cleans up the serialization and deserialization of said property
  • Cleans up our V3.1 serialization logic to ensure all supported JSON schema keywords are correctly written out
  • Adds a test to validate the above

@@ -358,11 +348,9 @@
Id = schema?.Id ?? Id;
Schema = schema?.Schema ?? Schema;
Comment = schema?.Comment ?? Comment;
Vocabulary = schema?.Vocabulary ?? Vocabulary;
Vocabulary = schema?.Vocabulary != null ? new Dictionary<string, bool>(schema.Vocabulary) : null;

Check warning

Code scanning / CodeQL

Virtual call in constructor or destructor Warning

Avoid virtual calls in a constructor or destructor.
Copy link

sonarcloud bot commented Oct 29, 2024

@MaggieKimani1 MaggieKimani1 merged commit 6987f7b into release/2.0.0 Oct 29, 2024
9 checks passed
@MaggieKimani1 MaggieKimani1 deleted the mk/remove-recursive-keywords branch October 29, 2024 13:31
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