swagger-maven-plugin

swagger date field vs date-time field

丶灬走出姿态 提交于 2019-12-30 03:21:10
问题 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 date with time and zone. How can I convert this date-time into date field ? I have a java entity class TimeEntry.java one of its property is Date, it looks like this. @ApiModelProperty(required = true) @JsonFormat(pattern = DATE_FORMAT) private Date

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

和自甴很熟 提交于 2019-12-12 13:07:16
问题 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 <mvc:annotation-driven/> <!-- Required so swagger-springmvc can access spring's RequestMappingHandlerMapping --> <bean class="com.mangofactory.swagger.configuration.SpringSwaggerConfig" /> <mvc:default-servlet-handler/> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

swagger maven plugin documentation is not generated

…衆ロ難τιáo~ 提交于 2019-12-11 04:28:02
问题 I am trying to generate swagger documentation using Swagger maven plugin But nothing is created, this is plugin in details I entered: <plugin> <groupId>io.swagger</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>2.2.2-SNAPSHOT</version> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>/data/AMEE/ame/api.yaml</inputSpec> <language>java</language> <configOptions> <sourceFolder>/data/AMEE/ame/gen</sourceFolder> </configOptions> <

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

余生颓废 提交于 2019-12-09 21:20:06
问题 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 public class WebMvcConfig extends WebMvcConfigurationSupport { @Override @Bean public RequestMappingHandlerMapping requestMappingHandlerMapping() { return new ApiVersionRequestMappingHandlerMapping("v"); } @Override public void addResourceHandlers

Enum in swagger

爷,独闯天下 提交于 2019-11-30 10:55:52
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 allowableValues for the enum constants. But I didn't find some good Java example how to really use it, specification is here . Java First Service package betlista.tests.swagger; import betlista.tests.swagger.model.Input; import betlista.tests.swagger.model.Output; import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.ApiOperation; @Api

Using Javadocs to generate Swagger document

邮差的信 提交于 2019-11-30 05:56:55
问题 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 documentation during compile time. Reading the existing Javadoc so that they can be used in the Swagger documentation. So far using the above plugin I was able to achieve point no 1. So for an existing REST method: /** * <p> * Gets the {@link

Enum in swagger

痞子三分冷 提交于 2019-11-29 16:16:20
问题 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 allowableValues for the enum constants. But I didn't find some good Java example how to really use it, specification is here. Java First Service package betlista.tests.swagger; import betlista.tests.swagger.model.Input; import betlista.tests.swagger.model.Output;

Using Javadocs to generate Swagger document

强颜欢笑 提交于 2019-11-28 06:56:32
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 documentation during compile time. Reading the existing Javadoc so that they can be used in the Swagger documentation. So far using the above plugin I was able to achieve point no 1. So for an existing REST method: /** * <p> * Gets the {@link DisplayPreferenceModel} with the name as provided in the parameter. The preference with the given name defined