8000 @ApiModelProperty example string does not escape char "\" from JSON example by heapifyman · Pull Request #1956 · springfox/springfox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

@ApiModelProperty example string does not escape char "\" from JSON example #1956

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

Merged
merged 4 commits into from
Jul 30, 2017
Merged

@ApiModelProperty example string does not escape char "\" from JSON example #1956

merged 4 commits into from
Jul 30, 2017

Conversation

heapifyman
Copy link
Contributor

fixes #1941

@codecov
Copy link
codecov bot commented Jul 30, 2017

Codecov Report

Merging #1956 into master will decrease coverage by 0.02%.
The diff coverage is 88.23%.

@@             Coverage Diff              @@
##             master    #1956      +/-   ##
============================================
- Coverage     95.91%   95.89%   -0.03%     
  Complexity     2647     2647              
============================================
  Files           311      311              
  Lines          5826     5840      +14     
  Branches        475      479       +4     
============================================
+ Hits           5588     5600      +12     
- Misses          138      139       +1     
- Partials        100      101       +1

@springfox springfox deleted a comment Jul 30, 2017
@springfox springfox deleted a comment Jul 30, 2017
Copy link
Member
@dilipkrish dilipkrish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heapifyman This is awesome. Could you perhaps add a few tests that test the serialization?

|| value.startsWith("[") // array
|| "true".equals(value) // true
|| "false".equals(value) // false
|| JSON_NUMBER_PATTERN.matcher(value).matches(); // number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a serialization json test that covers these criteria?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sure. But I'm going to need a little help with that.
I am not that familiar with groovy and the spock framework.
Also, where to put the tests? Can I extend some existing test class or create a new one?
Would be great if you could give me some starting point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you find it easier, the standard junit tests work just as well.

@dilipkrish dilipkrish merged commit 249c2de into springfox:master Jul 30, 2017
@dilipkrish dilipkrish added this to the 2.8.0 milestone Jul 30, 2017
@dilipkrish dilipkrish changed the title fixes #1941 @ApiModelProperty example string does not escape char "\" from JSON example Jan 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

swagger-ui does not remove java string escape char "\" from @ApiModelProperty example
2 participants
0