Add OpenAPI tests for using various attribute data types#1832
Merged
Add OpenAPI tests for using various attribute data types#1832
Conversation
55ca847 to
e514ccb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1832 +/- ##
==========================================
+ Coverage 92.76% 92.80% +0.03%
==========================================
Files 437 437
Lines 14821 14831 +10
Branches 2391 2392 +1
==========================================
+ Hits 13749 13764 +15
Misses 654 654
+ Partials 418 413 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ave like values, such as Int128/BigInteger/Half/Uri/IPAddress/Version and various others - Publicly exposes RuntimeTypeConverter.GetFriendlyTypeName(), which expands generic type arguments - Improved conversion from string to date/time values in RuntimeTypeConverter - Add conversion from string to System.Uri in RuntimeTypeConverter - Improved LiteralConstantExpression.GetStringValue for date/time values - Include original request body parse exception in meta stack trace - Use generic math in SumFilterParser example
e514ccb to
6508259
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds OpenAPI tests for using various data types in attributes that behave like values, such as
Int128/BigInteger/Half/Uri/IPAddress/Versionand various others.Depending on the built-in support (which varies per technology), the following custom converters may need to be added:
FilterParserand overrideGetConstantValueConverterForTypeChanges in this PR:
RuntimeTypeConverter.GetFriendlyTypeName(), which expands generic type argumentsRuntimeTypeConverterSystem.UriinRuntimeTypeConverterLiteralConstantExpression.GetStringValuefor date/time valuesSumFilterParserexampleDespite mentioned in the original issue, tuples are not covered because exposing them in an HTTP API is just odd.
Complex types and collections are not covered either, because how they work is likely going to change when #1439 is implemented.
Closes #1051.
QUALITY CHECKLIST