Questions tagged [springfox]

The Springfox suite of java libraries is all about automating the generation of machine and human readable specifications for JSON APIs written using the spring family of projects.

The Springfox suite of java libraries is all about automating the generation of machine and human readable specifications for JSON APIs written using the spring family of projects. Springfox works by examining an application, once, at runtime to infer API semantics based on spring configurations, class structure and various compile-time java annotations.

Useful links

794 questions
0
votes
1 answer

How to test Rest API call with swagger if needs authentication

I have springfox-swagger2 (version 2.6.1) and springfox-swagger-ui (version 2.6.1) in spring application. How to I can configure authorization token for calls which needs authorized for continue (how to set X-AUTH-TOKEN for swagger). Thanks!
user1894341
0
votes
1 answer

Request Header Setup in Swagger Integration With Spring Data Rest

I have a Swagger intgration setup for end points generated by Spring Data Rest in a Spring Boot project. The followings are related dependencies I have in the project: compile "io.springfox:springfox-swagger2:2.6.1" compile…
vic
  • 2,548
  • 9
  • 44
  • 74
0
votes
1 answer

Springfox integration with jackson

import javax.validation.constraints.Size; class User { @Size(min = 3) private String name; private String email; @JsonCreator public User(@JsonProperty(value = "name", required = true) String name, …
Romper
  • 2,009
  • 3
  • 24
  • 43
0
votes
0 answers

Exception in Springboot maven Weblogic environment

After adding Swagger2 in Spring Boot application an error is generated which says java.lang.NoSuchMethodError: com.google.common.collect.Multimaps.asMap(Lcom/google/common/collect/ListMultimap;)Ljava/util/Map; 1 ) Dependency for swagger is shown…
0
votes
2 answers

Custom RequestMappingHandlerMapping causes an error with Swagger

I have created a custom RequestMappingHandlerMapping with the latest version of Spring as follows so I can define a custom version annotation. WebConfiguration, @Configuration @ConditionalOnClass({ ApiVersionedResource.class }) public class…
nixgadget
  • 6,983
  • 16
  • 70
  • 103
0
votes
1 answer

A custom domain object isn't being shown while using @ModelAttribute

I am using Springfox and Swagger to generate swagger files. Right now I'm using @ModelAttribute to pull the variables from an object (NetworkCmd) to show as query params in the swagger doc. I currently have the following controller:…
hatz
  • 225
  • 1
  • 4
  • 13
0
votes
1 answer

How to set default paramType to query. current is body

If I do not set paramType = "query", password is body. How to change? @ApiOperation("登录") @ApiImplicitParams({ @ApiImplicitParam(name = "account", value = "用户名或手机号码", paramType = "query"), @ApiImplicitParam(name = "password", value =…
oldfeel
  • 420
  • 3
  • 12
0
votes
1 answer

Suppress ConflictingBeanDefinitionException for @ComponentScan

I have a Spring project where multiple beans may have the same bean name. In order to avoid ConflictingBeanDefinitionException the project has an overridden ContextNamespaceHandler. public class ContextNamespaceHandler extends…
infranoise
  • 277
  • 4
  • 18
0
votes
0 answers

Swagger UI Get Request with @RequestBody

I am using Swagger springfox version 2.5.0. Everything works pretty fine, except one thing. When a GET request method has @RequestBody Swagger UI throws this exception org.springframework.http.converter.HttpMessageNotReadableException The same GET…
pvpkiran
  • 25,582
  • 8
  • 87
  • 134
0
votes
1 answer

@EnableSwagger2 forces microservice to register as UNKNOWN to registry

We are using Springfox Swagger 2.6.0, Spring Boot 1.3.3.RELEASE and Spring Cloud 1.1.2.RELEASE. Annotated application class with @EnableDiscoveryClient is registered to the registry. When the @EnableSwagger2 annotation is present, the discovery…
Martin Asenov
  • 1,288
  • 2
  • 20
  • 38
0
votes
1 answer

Swagger Springfox configuration loads before Spring Boot Config

I have several microservices and all of them are registered in Eureka (Discovery Client). Recently I have enabled Swagger2 (SpringFox) for all the microservices. As soon as I enabled swagger my microservices started registering to Eureka as…
zeagord
  • 2,257
  • 3
  • 17
  • 24
0
votes
1 answer

Files generated in JUnit Tests while executed in Idea but not when executed via mvn test

I hava a JUnit test which generates some asciidoc files from an springfox swagger endpoint. These files are generated if I execute the test from Idea, but are not generated if I execute the test via mvn test. Is there a way to fix this? @Test …
ptrsauer
  • 3
  • 1
0
votes
1 answer

springfox swagger Json errors

I am new to swagger. I have the folowing code: @RestController @RequestMapping(value = { V1P}) @Api(value = V1P, description= "My Operations Management API") public class MethodController { /** * @return - */ @ApiOperation(value…
ndweck
  • 61
  • 2
  • 9
0
votes
1 answer

Empty field Data Type in springfox swagger ui

I have a Spring Web MVC application with rest services and I try to use Springfox for automated docs for it. I use io.springfox:springfox-swagger2:2.5.0 io.springfox:springfox-swagger-ui:2.5.0 org.webjars:swagger-ui:2.1.4 My…
beowulf13th
  • 447
  • 1
  • 6
  • 16
0
votes
1 answer

SpringFox Swagger integration with Springboot app

I followed the steps listed in this link (until step 5.1) for integrating swagger documentation. Below is how my controller class looks like. I get a 404 error when I try to access the documentation similar to how it is described in the…
Punter Vicky
  • 15,954
  • 56
  • 188
  • 315