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 data and type mismatch warning for an example object with a date value #1530

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

MaggieKimani1
Copy link
Contributor

@MaggieKimani1 MaggieKimani1 commented Jan 16, 2024

  • Inspects the TimeOfDay property of a DateTimeOffSet value in an example object during parsing to determine whether it's a date-only or date-time type.

  • If the time component is exactly midnight(00:00:00) meaning no time has elapsed, we conclude that it is a date-only value hence cast it to an OpenApiDate type, otherwise its converted to an OpenApiDateTime object.

  • Fixes Data and type mismatch found for example of a referenced schema #1526

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@MaggieKimani1 MaggieKimani1 changed the title Fix data and type mismatch warning for a schema example with a date value Fix data and type mismatch warning for an example object with a date value Jan 16, 2024
@MaggieKimani1 MaggieKimani1 merged commit efb6831 into vnext Jan 16, 2024
9 of 10 checks passed
@MaggieKimani1 MaggieKimani1 deleted the mk/fix-data-and-type-mismatch branch January 16, 2024 12:32
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.

Data and type mismatch found for example of a referenced schema
3 participants