You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got some services that are using @BeanParam parameters (using CXF) and wanted to add these services to swagger. Following #446 I added swagger-jersey2-jaxrs_2.11 to my build (version 1.3.12). In #446 it is said that one needs to use the com.wordnik.swagger.jersey.config.JerseyJaxrsConfig servlet. However I'm using Spring and configure swagger in a @Configuration class using com.wordnik.swagger.jaxrs.config.BeanConfig. I already added the Jersey variants of ResourceListingProvider and ApiDeclarationProvider, like this
@Bean("resourceWriter")
public ResourceListingProvider swaggerResourceListingProvider()
{
return new JerseyResourceListingProvider();
}
@Bean("apiWriter")
public ApiDeclarationProvider swaggerApiDeclarationProvider()
{
return new JerseyApiDeclarationProvider();
}
But this doesn't work. In swagger-ui the corresponding BeanParameter is shown as body parameter but it actually contains two PathParameters.
This is what my bean looks like:
public final class ApplicationIdentifierParameter
{
private String mApplicationId;
private String mProjectId;
public String getApplicationId()
{
return mApplicationId;
}
@ApiParam(value = "Application type", required = true)
@PathParam("applicationId")
public void setApplicationId(String aApplicationId)
{
mApplicationId = aApplicationId;
}
public String getProjectId()
{
return mProjectId;
}
@ApiParam(value = "Application type", required = true)
@PathParam("projectId")
public void setProjectId(String aProjectId)
{
mProjectId = aProjectId;
}
}
The text was updated successfully, but these errors were encountered:
You followed a ticket from over 3 years ago, instead of checking the wiki for actual documentation on how to integrate swagger-core with your code. You're using an ancient version of the project which is no longer supported. Try using the latest first, and if you still have issues, open a new ticket.
Hi,
I got some services that are using
@BeanParam
parameters (using CXF) and wanted to add these services to swagger. Following #446 I addedswagger-jersey2-jaxrs_2.11
to my build (version 1.3.12). In #446 it is said that one needs to use thecom.wordnik.swagger.jersey.config.JerseyJaxrsConfig
servlet. However I'm using Spring and configure swagger in a@Configuration
class usingcom.wordnik.swagger.jaxrs.config.BeanConfig
. I already added the Jersey variants ofResourceListingProvider
andApiDeclarationProvider
, like thisBut this doesn't work. In swagger-ui the corresponding BeanParameter is shown as body parameter but it actually contains two PathParameters.
This is what my bean looks like:
The text was updated successfully, but these errors were encountered: