Skip to content

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

@sonarqubecloud
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
@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

4 participants