Skip to content

Conversation

@MaggieKimani1
Copy link
Contributor

@MaggieKimani1 MaggieKimani1 commented Mar 13, 2024

Fixes #1106,
fixes #1265

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
51.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud


// multipleOf
writer.WriteProperty(OpenApiConstants.MultipleOf, schema.GetMultipleOf());
writer.WriteProperty(OpenApiConstants.MultipleOf, schema.GetOpenApiMultipleOf());
Copy link
Member

Choose a reason for hiding this comment

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

Are we forced to prefix with OpenAPI to differentiate from the jsonschema library methods?
Is there any reason why we can't use that library's methods?

Copy link
Contributor Author

@MaggieKimani1 MaggieKimani1 Mar 18, 2024

Choose a reason for hiding this comment

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

Yes prefixing with OpenApi helps to distinguish our custom implementation from the JsonSchema.NET library's.
Also we're overriding the library's methods because the keywords such as MultipleOf, Maximum and Minimum are defined as decimal types and we need to replace that and use double for us to support parsing schema values exceeding decimal's ranges.

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to PR upstream instead of maintaining our own code in this case?

@MaggieKimani1 MaggieKimani1 self-assigned this Mar 18, 2024
@MaggieKimani1 MaggieKimani1 modified the milestone: NET:2.0 Mar 18, 2024
Base automatically changed from release/2.0.0 to vnext November 5, 2024 11:30
@baywet baywet deleted the branch dev February 6, 2025 14:29
@baywet baywet closed this Feb 6, 2025
@baywet
Copy link
Member

baywet commented Feb 6, 2025

sorry about the closure, we have aligned branching with other repositories, if this is still relevant, please re-open on main

@baywet baywet deleted the mk/replace-decimal-with-double branch April 17, 2025 13:22
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.

3 participants