-
Notifications
You must be signed in to change notification settings - Fork 352
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
Added writer setting to add type annotations #1946
Conversation
* Added 'AlwaysAddTypeAnnotationsForDerivedTypes' to ODataMessageWriterSettings * Chagned JsonNoMetadataLevel to use 'JsonMinimalMetadataTypeNameOracle' when 'AlwaysAddTypeAnnotationsForDerivedTypes' is setting * Updated unit tests
test/FunctionalTests/Microsoft.OData.Core.Tests/JsonLight/JsonLightMetadataLevelTests.cs
Outdated
Show resolved
Hide resolved
test/FunctionalTests/Microsoft.OData.Core.Tests/JsonLight/JsonNoMetadataLevelTests.cs
Show resolved
Hide resolved
test/FunctionalTests/Microsoft.OData.Core.Tests/JsonLight/JsonNoMetadataLevelTests.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
@@ -24,10 +24,25 @@ internal abstract class JsonLightMetadataLevel | |||
/// </summary> | |||
/// <param name="mediaType">The full media type being written. This media type must have a type/subtype of "application/json".</param> | |||
/// <param name="metadataDocumentUri">The metadata document uri from the writer settings.</param> | |||
/// <param name="alwaysAddTypeAnnotationsForDerivedTypes">When set, type annotations will be added for derived types, even when the metadata level is set to "None".</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alwaysAddTypeAnnotationsForDerivedTypes [](start = 25, length = 39)
should remove this param #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both model
and writingResponse
appear to have appropriate docs:
/// <param name="model">The edm model.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to remove incorrect alwaysAddTypeAnnotationsForDerivedTypes
doc comment. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues
This pull request fixes issue #1945.
Description
Added 'AlwaysAddTypeAnnotationsForDerivedTypes' to ODataMessageWriterSettings
Chagned JsonNoMetadataLevel to use 'JsonMinimalMetadataTypeNameOracle' when 'AlwaysAddTypeAnnotationsForDerivedTypes' is setting
Updated unit tests
Checklist (Uncheck if it is not completed)