Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Fix data and type mismatch warning for an example object with a date value#1530

Merged
MaggieKimani1 merged 3 commits intovnextmicrosoft/OpenAPI.NET:vnextfrom
mk/fix-data-and-type-mismatchmicrosoft/OpenAPI.NET:mk/fix-data-and-type-mismatchCopy head branch name to clipboard
Jan 16, 2024
Merged

Fix data and type mismatch warning for an example object with a date value#1530
MaggieKimani1 merged 3 commits intovnextmicrosoft/OpenAPI.NET:vnextfrom
mk/fix-data-and-type-mismatchmicrosoft/OpenAPI.NET:mk/fix-data-and-type-mismatchCopy head branch name to clipboard

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

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.