Questions tagged [swagger-maven-plugin]

A maven build plugin which allows Swagger JSON and API documents generation.

The swagger-maven-plugin lets generate documentation artifacts during a build; by default, it is bound to the compile sources phase.

For usage instructions, refer to the github project wiki.

58 questions
33
votes
6 answers

Enum in swagger

I'm wondering how to document enums in swagger. According to JavaDoc The dataType. See the documentation for the supported datatypes. If the data type is a custom object, set it's name, or nothing. In case of an enum use 'string' and…
Betlista
  • 9,561
  • 10
  • 62
  • 99
23
votes
2 answers

Using Javadocs to generate Swagger document

I want to build the Swagger documentation for an existing set of RESTful APIs. I have the following requirement: Generate Swagger Doc offline (I used http://kongchen.github.io/swagger-maven-plugin/). This plugin helps me to generate the Swagger…
Raj
  • 927
  • 3
  • 16
  • 36
13
votes
2 answers

swagger date field vs date-time field

I am using swagger to test my rest api, one of the property of my entity class is a date field for which I need the date in yyyy-mm-dd format , but swagger model schema is showing this field as date-time instead of date field, therefore it gives…
Sourav
  • 306
  • 1
  • 4
  • 11
7
votes
1 answer

swagger-maven-plugin does not generate "paths" elements for individual request mappings

I have a simple endpoint I would like to process with the swagger-maven-plugin. The resulting swagger.conf doesn't reflect the correct "paths:" for the individual @ApiOperations. The root of the api is "/api", and I want to add endpoints for GET and…
Mark Laff
  • 297
  • 4
  • 17
6
votes
1 answer

swagger-maven-plugin triggers Javadoc warning: element value must be a constant expression (but it is!) in Java annotation

Javadoc (via Maven) is giving me the following error in one my Java JAX-RS interface method signatures: error: element value must be a constant expression Here is my JAX-RS interface: public interface FooResource { …
4
votes
0 answers

Moving artifact from Gitlab CI to project Wiki page

I'm setting up Gitlab CI to create an asciidoc page from a Swagger YAML specification. To this end, I've set up Gitlab to execute the swagger maven plugin and save the results to the public artifacts folder, like this: enter codedeploy:jdk8: stage:…
reinouts
  • 185
  • 1
  • 12
4
votes
0 answers

Swagger-annotation generation

I have a problem generating a swagger.json file with swagger annotations. The problem is with the generation of map with array. Ex: I have an @ApiModel with a field: @JsonProperty private Map example; When it generates it looks…
Mike
  • 2,062
  • 3
  • 21
  • 34
4
votes
2 answers

Offline swagger documentation using maven plugin

I am trying to generate swagger documentation, for that I need to start the server. I Want to generate swagger documentation offline (with out starting the server), I just got this link swagger-codegen-maven-plugin But when I added above plugin to…
Sunil Rk
  • 840
  • 5
  • 12
  • 29
3
votes
0 answers

Maven plugin that generates openapi3 json from swagger 2 annotations

Project uses annotations from swagger 2, from this package: io.swagger swagger-annotations 1.5.13 And then…
user9458184
3
votes
0 answers

Generating only the parameter properties I actually need with swagger-maven-plugin in Java

I would like to annotate my request methods for the swagger maven plugin so that only the properties I actually need are displayed in the swagger request parameter schema, instead of all properties of a class. For example, if I have a person class…
Jure Kolenko
  • 779
  • 5
  • 10
3
votes
6 answers

Spring boot & Swagger 2 UI & custom requestmappinghandlermapping - mapping issue

I have own RequestMappingHandlerMapping and I am using springfox-swagger-ui. After adding my custom mapping, I am not able to achieve swagger ui at http://localhost:8080/swagger-ui.html. Any ideas? This is my configuration. @Configuration …
Babu
  • 2,579
  • 3
  • 31
  • 45
3
votes
1 answer

Why does swagger annotations generate api-docs with default path prefix

I used the below maven plugin to integrate swagger with my application https://github.com/martypitt/swagger-springmvc I configured the below in my spring servlet xml