-
Notifications
You must be signed in to change notification settings - Fork 2
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
Updated references to JsonIgnore - applies to enum members #20
Updated references to JsonIgnore - applies to enum members #20
Conversation
@@ -22,7 +22,7 @@ Indicates that the property should be excluded from generation. | |||
|
|||
This attribute functions exactly the same as the **System.Text.Json.Serialization.JsonIgnoreAttribute**. It | |||
is included separately to support the case where the model should be serialized with | |||
a property but schema generation should ignore it. | |||
a property or an enum member but schema generation should ignore it. |
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's no need to update thes /api docs. These will be rebuilt automatically from the source after the libs merge to master.
You'll need to back out this change and force push. Otherwise, there will be merge conflict (and you'll have to do it anyway).
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.
Ah, but I didn't update the XML doc comment on JsonExclude
. Need to do that, then!
TBH, I didn't carefully read the verbiage saying it only applies to properties (otherwise I wouldn't have expected it to work on enums). I'll go check the code repo for XML comments etc. to see what else I might have missed.
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.
TBH, I didn't carefully read the verbiage saying it only applies to properties (otherwise I wouldn't have expected it to work on enums).
I still think it's an improvement.
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.
Sorry about that. PR: json-everything/json-everything#801
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.
I still think it's an improvement.
Yeah, that's what I was saying, I was just projecting my assumptions, but the documentation clearly stated the intent
Update the documentation in accordance with the change in json-everything/json-everything#796
In addition to properties, enum members can now also be decorated with
JsonIgnoreAttribute
orJsonExcludeAttribute
. The effect is that the ignored/excluded members can be excluded from the schema generation, but still appear in other kinds of serialization or code generation.Depends on json-everything/json-everything#799