Refs #1107, #1318, #1118 - property example serialization #1681
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.
Refs #1107, #1318, #1118, kongchen/swagger-maven-plugin#233
initially triggered by #1107 analysis, solves possibly regression related to #1640, causing property field "example" not to be serialized to json.
This fix doesn't solve however neither #1107 (swagger-ui related, but probably solved by updating core/models) nor #1118 and it doesn't address similar discussion in kongchen/swagger-maven-plugin#233.
Either part of this PR, or of further work on #1118, the following steps could be taken to cover the whole "area".
1 - Resolving from ApiModelProperty annotation.
similarly to discussion in kongchen/swagger-maven-plugin#233, code could be enhanced to parse example value according to format and property type.
2 - Array type deserialization in PropertyDeserialization.
Code could be enhanced by deserializing additional properties (which should be part of swagger schema if not mistaken) also for array types, e.g. "example".
@webron please let me know what you think