Example Value content-type set as json in spring fox 2.8.0 version
See original GitHub issue-
Version - springfox-swagger-ui v2.8.0 & springfox-swagger2 v2.8.0
-
Question -
I am using spring-fox (above version) in spring-boot 1.5. In swagger-ui.html I am seeing the Example Value is defaulted to application/xml
however, I would like to select application/json
as default while page loading. Is there anywhere it can be done via Docket
configuration? Sample spring boot controller code and screenshot below.
@PostMapping(value = "/capture", produces = { "application/json", "application/xml" }, consumes = {
"application/json", "application/xml" })
ResponseEntity<?> capture(
@ApiParam(value = "Capture request", required = true) @Valid
@RequestBody PaymentProcessorRequest paymentProcessorRequest)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Spring fox swagger ui version 2.8.0 Example Value
This Example Value is getting derived from the the Object Employee and converting to either xml , json etc. My question is, is...
Read more >How to Set JSON Content Type In Spring MVC - Baeldung
Let's start with a simple example of an API exposing a JSON string. Here's our endpoint: @RequestMapping( value = "/greetings-with-response-body ...
Read more >docs/release-notes.md · serv/springfox - Gitee.com
Content-Type not being set #1029; Support for custom Optional class #1027; java.io.FileNotFoundException: Jar URL cannot be resolved to absolute file path #1026 ...
Read more >Versioning REST API with Spring Boot and Swagger
In this article, I'm going to show you how to maintain several versions of the REST API in your application in the most...
Read more >Spring Boot RESTful API Documentation with Swagger 2
The current version defines a set HTML, JavaScript, and CSS assets to ... json-path. test. io.springfox. springfox-swagger-ui. 2.8.0.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good to know @dilipkrish. Will raise a feature request Swagger-ui. Thanks
I’ve created similar issue with PR but connected with Docket configuration: https://github.com/springfox/springfox/issues/3062