Springfox Swagger 3 Example

2 and older) is popular for Spring Boot applications. 2 documents, you can use SwaggerFeature instead of Swagger2Feature (for CXF versions <= 3. The Swagger specification is a powerful definition format to describe RESTful APIs. Putting Spring Boot to REST with Swagger (and grab a beer in the process) 20-01-2018 21-01-2018 Roger Goossens 3 Comments This blog post (the first in years) will be part of a small series in which I'll explore the world of Spring Boot (micro)services. Investigating Springfox and Swagger UI, but I am facing an issue. In this article, I show how to use Swagger’s security models to to deploy this API using an OAuth2 configuration. In Swagger terms, an operation is basically a particular API endpoint (in Springfox terms, this would be a Java method annotated with @RequestMapping). Product managers, partners, and even potential clients can have input into the design of your API, because they can see it clearly mapped out in the friendly UI. For this sample, you can use the. We have already added Swagger 2 dependencies earlier. from Swagger or Open API 3 and. Let’s start with the libraries. xml customers-api-swagger/pom. API design: an example. A Visual Guide to What's New in Swagger 3. My team is working on a web application using Micro Service Architecture and Angular + Spring MVC. This implementation helps bringing the capabilities of Swagger to a Spring Boot application in a seamless manner. 2 hemos tenido ningún problema en la carga de la swagger-ui. In order to enable Springfox to create a Swagger documentation for our Spring Data REST API, you have to take the following steps. Sign in Sign up Instantly share code, notes. Introducing the j8-async template in Swagger-codegen. Code ví dụ Swagger với springfox-swagger2, swagger ui (Xem lại: Swagger là gì) Trong bài này mình sẽ sử dụng lại Code ví dụ Spring Boot RESTful Webservice với các api thêm, sửa, xóa user và tạo tài liệu để import vào swagger. 4, but neither version used the x-examples property of the swagger. 2 and older) is popular for Spring Boot applications. However, sometimes you also want to have a static version of the documentation available, so that it can be printed, read without […]. In order to use springfox in our project we will have to add the below dependency. 0 duplicate @alex springfox doesn't work with spring boot 2. Discover open source packages, modules and frameworks you can use in your code. Next I started to embark on a tour of the examples and tried to get everything to work. Of the libraries that offered Spring integration the one called springfox seemed to be both still active and have Swagger 2. Kin Lane, the API Evangelist, recently got in touch asking whether I had a good example of an OpenAPI 3. It describes the api format including URL, method, and representation to describe REST web services. Swagger Configuration. Here, I will cover Springfox integration with my REST Hello World project. Configuring Spring Rest, Spring Data JPA and H2 in Spring Boot 2. While integrating with hybris, hybris server throws following excepti. We need to create a Docket bean in a Spring Boot configuration to configure Swagger 2. In order to enable Springfox to create a Swagger documentation for our Spring Data REST API, you have to take the following steps. For more info check out Swagger's "pet store" example or the Swagger OpenApi. (https://swagger. 2 hemos tenido ningún problema en la carga de la swagger-ui. Once we have described security definitions in securityDefinition we can apply them to the overall API or to specific operations with the security sections. Spring Boot REST API with SpringDoc + OpenAPI 3. springframework. The CXF Swagger2Feature allows you to generate Swagger 2. API Manager: Set API icon in Swagger 2. How to disable Swagger UI in Production ? Swagger UI can be enabled or disabled based on the profile. Swagger provides specification and we will use SpringFox implementation in our example. 2) does not support WebFlux, so it has to use 3. For example: [first, second, third]. io or on irc. Springfox/Swagger : Documenting HashMap object People, I am trying to generate documentation for the spring services and I have one service which is like @RequestMapping(method = RequestMethod. springfox springfox-swagger2://://swagger-ui. To document the service, Springfox uses a Docket. The OperationBuilderPlugin lets you access the OperationBuilder that is used to document each operation in the Swagger specification. How to disable Swagger UI in Production ? Swagger UI can be enabled or disabled based on the profile. io - A Visual Guide to What's New in Swagger 3. How to set up Swagger in your app. These examples are extracted from open source projects. SpringFoxの最小の設定でやってみます。 (1) SpringFoxを有効にするアノテーションです。 (2) DocketがSwaggerの設定を行うインターフェースになります。 (3) DocumentationTypeにSwagger2を指定します。 (4) select()でApiSelectorBuilderを生成 (5) apis()で対象とするRequestHandlerを選択し. duplicate @dohoon (#2021) @ApiModelProperty. Let’s add the swagger 2 support for our application. 5) duplicate @madheshr Upgrade to swagger-ui 3. In this article we will use a Springfox-based implementation of Swagger. Do not forget to change the password in the URL. I have provided a workaround: The @ApiParam has an issue where, without a default value set in "example," the attribute will cause this exception. Anyone found any good ways or practices to making Swagger work better with Kotlin. 2 and older) is popular for Spring Boot applications. The api exposed for uploading large files can receive HTTP multi-part file upload request. This is an online swagger codegen server. When you click Import URL, you will see a preview of the web service and tests that will be created. In order to generate the Swagger documentation for your API, Swagger offers a set of annotations to declare and manipulate the output. Trying out. 0) make object deserialization for the entire JVM process Turing complete with an exec function. 2 documents, you can use SwaggerFeature instead of Swagger2Feature. For JAX-RS resources, this would automatically take the value of the @Consumes annotation if such exists. springframework. Swagger (now the “Open API Initiative”) is a specification and framework for describing REST APIs using a common language that everyone can understand. Spring REST Docs and SpringFox Swagger are great for API documentation, but one is not better than the other — it just depends on the different use cases. Further reading:. In this example, I am going to show how to integrate Swagger with a Spring boot applicaton. @REM [email protected] Licensed to the Apache Software Foundation (ASF) under one. x) and integrates with other Swagger tooling. For each story, we create few implementation and test tasks. The support should be available in the next version. 0 included an overhaul of how examples can be used within the specification, including the ability to describe multiple examples, reuse examples within your API definition, and reference external examples. Web MVC and Swagger configuration. How to disable Swagger UI in Production ? Swagger UI can be enabled or disabled based on the profile. In the next blog I will show you how you can provide Swagger UI, generate Java client, JavaScript client modify base paths etc. Below I extended the Spring sample Building a RESTful Web Service with Swagger annotations. Maven example as follows. Issues with Swagger-codegen for C#; Example: from "IO. my Swagger config looks like this: @Configuration @EnableSwagger2 public class Sw. Spring Rest Docs features 6. Code ví dụ Swagger với springfox-swagger2, swagger ui (Xem lại: Swagger là gì) Trong bài này mình sẽ sử dụng lại Code ví dụ Spring Boot RESTful Webservice với các api thêm, sửa, xóa user và tạo tài liệu để import vào swagger. Spring and Swagger. 2 and older) is popular for Spring Boot applications. Setup the Swagger UI. 0 Is it possible to define an API icon in the Swagger 2. I am also adding the spring-boot-maven-plugin to be able to run it from maven using Tomcat. Introducing the j8-async template in Swagger-codegen. In this example, I am going to show how to integrate Swagger with a Spring boot applicaton. swagger-codegen-cliが自動生成するコードは空の値を返す実装になっています。これではスタブの利用側に不親切なので、 example セクションに書いたデータを返す実装にしてほしいと思います。. This is the note about how to make the swagger work together with Spring Boot. Next, click the "or import your Swagger spec" link. APPLICATION_JSON_VALUE) public ResponseEntity>. Spring 5 introduced WebFlux, and the current version of Spring Fox Swagger 2 (2. Note for Swagger UI users: Support for multiple examples is available since Swagger UI 3. 2 (It was not an issue in 2. Example of Spring Rest, Spring Data JPA, and H2 to create restful services endpoints with Spring Boot. (https://swagger. Once we have described security definitions in securityDefinition we can apply them to the overall API or to specific operations with the security sections. Let’s start with the libraries. Takes in comma-separated values of content types. springfox springfox-swagger2://://swagger-ui. springfox-swagger2はSpringソースからSwagger Coreの機能を利用し、Swagger Specificationに従ったJSON APIを作成するためのライブラリです。 Swaggerの有効化 Swaggerのdependencyを追加した後、 @Configration なクラスに @EnableSwagger2 を追加して起動します。. 0 APIs, and the Swagger UI to visual and automatically generate documentation of an API defined in OAS 3. If you use another framework that is based on a Servlet API, you can use ServletContextListener that is described later in this article. I'll be using Java and Spring Boot for RESTful API implementation examples. In Swagger terms, an operation is basically a particular API endpoint (in Springfox terms, this would be a Java method annotated with @RequestMapping). Currently, Springfox that has replaced Swagger-SpringMVC (Swagger 1. Unfortunately, SpringFox Swagger still does not provide support for Spring WebFlux. properties. I have spring boot rest api (resources) which uses another spring boot authorisation server, I have added Swagger config to the resource application to get a nice and quick documentation/test platform for the rest API. Some examples can be found in examples/ directory. With SpringFox 2. io or on irc. Swagger is an auto-documentation-generation tool. Spring Data JPA Query method deleteBy approach (see Spring Data JPA – DeleteBy Example) do it in two steps (It first fetches the entities and then call delete on the fetched data to delete the data). springfox是通过注解的形式自动生成API文档的,利用它,可以很方便的学些restful API;swagger主要用户展示springfox生成的API文档,而且还提供测试界面,自动显示json格式的响应,大大方便了后台开发人员和前端的沟通与联调成本。. It ruins the elegance of Kotlin, especially with features of primary constructors and data classes. For each endpoint/method combination in your spec, Assertible will create one test. 五、 和Swagger UI的集成 首先,从github swagger-ui 上下载Swagger-UI, 把该项目dist目录下的内容拷贝到项目的resources的目录public下。 六、访问. This is how we are implementing OpenAPI/Swagger in our projects. 0 license) supports the latest version of the OpenAPI spec (3. We could have lot of API's and if people don't know how to use it than it rather useless. Springfox Swagger UI. I've been working with Swagger for almost two months now and as our project progressed issues like this showed up. JSON API documentation for spring based applications - 2. After that we simply put our API into iterations and keep making. Anyone found any good ways or practices to making Swagger work better with Kotlin. io api swagger: Used By: 649 artifacts: Central (17) Spring Plugins (3) ICM (6) Version. UnsupportedOperationException due to the bad coding practice while using Array. By default, Swagger-UI attempts to validate specs against swagger. 0-SNAPSHOT to support WebFlux. Hello Friends, In this tutorial, you will learn the following : 1. In earlier article Describe and Document Your RESTful API with Swagger 2 Specification (Part 2), I discussed on how we can add custom information over default configuration to generate more. SpringFoxの最小の設定でやってみます。 (1) SpringFoxを有効にするアノテーションです。 (2) DocketがSwaggerの設定を行うインターフェースになります。 (3) DocumentationTypeにSwagger2を指定します。 (4) select()でApiSelectorBuilderを生成 (5) apis()で対象とするRequestHandlerを選択し. There’s more than one way to skin a cat as it comes down to transforming a Swagger API into some workable code. Springfox implementation of the Swagger 2 specification; This tutorial will cover the Swagger 2 for a Spring REST web service using the Springfox ( springfox-swagger2 ) implementation. Do not forget to change the password in the URL. This page was generated by GitHub Pages using the Cayman theme by Jason Long. In this example, I am going to show how to integrate Swagger with a Spring boot applicaton. API Manager: Set API icon in Swagger 2. This is the first version to support OAS 3. This implementation helps bringing the capabilities of Swagger to a Spring Boot application in a seamless manner. SpringfoxはSwagger- Springfoxを置き換え、Swagger仕様1. First of all, we need a Spring Boot project as an example:. An example illustrates what the value is supposed to be. For this sample, you can use the. In Swagger terms, an operation is basically a particular API endpoint (in Springfox terms, this would be a Java method annotated with @RequestMapping). I have spring boot rest api (resources) which uses another spring boot authorisation server, I have added Swagger config to the resource application to get a nice and quick documentation/test platform for the rest API. In fact, this is the suite of java libraries used for automating the generation of machine and human readable specifications for JSON APIs written using Spring Framework. Trong bài viết này, chúng ta hãy cùng nhau tìm hiểu cách tạo RESTful API document sử dụng Springfox cho Swagger trong Spring Boot các bạn nhé! Đầu tiên, chúng ta cần một Spring Boot project để làm ví dụ:. If you are not familiar with Swagger, you should visit its web page to learn more before continuing with this article. handling with Yeoman for single page applications Springfox - not associated with any project from Pivotal - is an evolution of the Spring MVC and Swagger integration Endy Muhardin has published a video on using Spring Boot support for JPA Krishna Srinivasan has put together a nice guide on using the. In order to setup Swagger UI with the project, we will use Springfox library. 2, how can I set the example for a LocalDate field to be the current date? Some examples of things I've attempted: 1) LocalDate field, no example value import io. Con una versión anterior de Springfox - 2. Here is a maven pom. API Manager: Set API icon in Swagger 2. An example illustrates what the value is supposed to be. 0 - This is a great blog post by the folks at ReadMe. Here’s SpringFox. I tried to integrate with hybris but could not succeed. If you are not aware what is swagger you can visit the their web page to know more about the Swagger. For the tutorial, we will use the Springfox implementation of the Swagger 2 specification. We could have lot of API's and if people don't know how to use it than it rather useless. As an alternative, you can choose the code-first approach and use Swagger2Markup together with Swagger JAX-RS, Springfox or spring-restdocs. springfox', name: 'springfox-swagger2', version:'2. Migration of your project from Swagger to SpringRestDocs. We need to add few Spring configuration in order to generate Swagger Documentation. Most of the examples for using swagger with spring boot are with springMVC. This is the first version to support OAS 3. If your using Maven build tool, then 1. Swagger 2 ,or, Open API Specification is a definition used for REST APIs. Setup the Swagger UI. net, #swagger. Please let me know if. These source code samples are taken from different open source projects. The parameter spring. Generating Swaggger Documentation with Spring Boot. The support should be available in the next version. If you have any questions the gitter channel is always open :) Re: Swagger › Integrating swagger with Spring 3. Spring boot is designed to simplify all possible spring development, designed to automatically do as much as possible. springfox dependency to be added. In this article, I show how to use Swagger’s security models to to deploy this API using an OAuth2 configuration. I find the annotations from Swagger very intrusive and pollutes the code. AWS S3 Image Upload + Swagger + Spring Boot + User Login and Registration Example. Recently, I have a holiday. Additionally, Swagger UI (which is an actively managed project with an Apache 2. Let’s add the swagger 2 support for our application. SpringFox 2. Let’s start with the libraries. Swagger 2 ,or, Open API Specification is a definition used for REST APIs. It ruins the elegance of Kotlin, especially with features of primary constructors and data classes. Swagger Editor. @EnableSwagger2 enables SpringFox support for Swagger 2. That is this doesn't seem to be supported by swagger-ui at the moment. You can visit Swagger's Homepage to get more information about Swagger. For example, you could use pathMapping("/") to establish a servlet path mapping. This is a basic code snippet that we can include in our project's pom. Generating an interactive API console to quickly learn about and try the API. 4, but neither version used the x-examples property of the swagger. How to disable Swagger UI in Production ? Swagger UI can be enabled or disabled based on the profile. You don't need to add any type of comments to your code to generate documentation. springfox » springfox-swagger-ui Springfox Swagger UI. How to add example values for parameters in Swagger-UI built. html 中显示Swagger文档. Swagger is a very powerful tool to generate documentation of your Rest based web services API containing Spring annotations. 0 - This is a great blog post by the folks at ReadMe. Discover open source packages, modules and frameworks you can use in your code. io or on irc. properties ers-api-swagger/src/main/resources/application. Below I extended the Spring sample Building a RESTful Web Service with Swagger annotations. The documentation is based on the code itself so any changes to our RESTful services will be included automatical. Currently, Springfox that has replaced Swagger-SpringMVC (Swagger 1. In this blog, I shall integrate swagger just making 3 changes in the previous code i. はじめに REST API をタイプセーフに呼び出したいのです。 その実現のため WADLとかを追いかけてたんですが、Swagger は完全にノーマークでした。. It supports such formats like swagger, RAML and jsonapi. springfox springfox-swagger2://://swagger-ui. Swagger UI generates an interactive API console for users to quickly learn about your API and experiment with requests. 4, but neither version used the x-examples property of the swagger. Spring can do that for you. If you need to do the project manually, you can do this small project with me. To get started with Springfox, we need to add following dependencies to POM (I’m using Maven for this project):. Please let me know if. Live Coding session - how to connect and start using SpringRestDocs 5. Generating an interactive API console to quickly learn about and try the API. All gists Back to GitHub. It generates the specification (contract) based on your code and also deploys the Swagger UI client with your application, allowing you to immediately test your REST API. A Springfox Docket instance provides the primary API configuration with sensible defaults and convenience methods for configuration. In the early 1800s, the American railroad was a free-for-all. Swagger2 can be enabled in Spring Boot application by including SpringFox library. 0 and spring data Kay-RC2 duplicate. Swagger is a very powerful tool to generate documentation of your Rest based web services API containing Spring annotations. 为啥使用Swagger. 0 and Swagger Editor 3. 2 documents, you can use SwaggerFeature instead of Swagger2Feature. Maven example as follows. Table of Contents What is Swagger Project Structure and Technology Stack Create REST APIs Swagger2 Configuration Swagger2 Annotations Demo What is Swagger. I tried to integrate with hybris but could not succeed. If you are not aware about Swagger, you can read more about it on the official Swagger site. 1-SNAPSHOT version in which this is remedied considerably. Live Coding session - how to connect and start using SpringRestDocs 5. Mad Gadget is one of the most pernicious vulnerabilities we’ve seen. After completing the Spring Boot REST API Documentation with Swagger 2 example, you will understand the usage of this wonderful API and you will be able to apply the similar concept for your own projects. io/specification/). Note for Swagger UI users: Support for multiple examples is available since Swagger UI 3. Currently, Springfox, that has replaced Swagger-SpringMVC (Swagger 1. The parameter spring. 2 and older) is popular for Spring Boot applications. Discover open source packages, modules and frameworks you can use in your code. In fact, this is the suite of java libraries used for automating the generation of machine and human readable specifications for JSON APIs written using Spring Framework. 2' compile group: 'io. Code ví dụ Swagger với springfox-swagger2, swagger ui (Xem lại: Swagger là gì) Trong bài này mình sẽ sử dụng lại Code ví dụ Spring Boot RESTful Webservice với các api thêm, sửa, xóa user và tạo tài liệu để import vào swagger. 1:认识SwaggerSwagger 是一个规范和完整的框架,用于生成、描述、调用和可视化 RESTful 风格的 Web 服务。总体目标是使客户端和文件系统作为服务器以同样的速度来更新。. Swagger is one of the most popular specifications for REST APIs for a number of reasons: * Swagger generates an interactive API console for people to quickly learn about and try the API. Springfox swagger-ui. This is a sample server Petstore server. UnsupportedOperationException due to the bad coding practice while using Array. Spring Boot allows us to create RESTful web-services with ease, Swagger specifies a format to describe the capabilities and operations of these services and with Swagger UI it is possible to explore our REST API with a nice graphical user interface in our browser. Gets languages supported by the client generator. In order to setup Swagger UI with the project, we will use Springfox library. API design: an example. net, #swagger. Swagger makes it easy to document Restful API. xml example:. Springfox supports both Swagger 1. It is simple to use. The documentation is based on the code itself so any changes to our RESTful services will be included automatical. For JAX-RS resources, this would automatically take the value of the @Consumes annotation if such exists. 1 / springfox-swagger-ui / JSON API documentation for spring based applications / Get informed about new snapshots or releases. Currently, Springfox that has replaced Swagger-SpringMVC (Swagger 1. I could integrate same on standalone application. It is simple to use. You can find a plenty of other Swagger speficitation examples out there which you can get inspiration from, and people have published lots of materials on how to write good specification in Swagger. 4 is important. One of the most usual tasks requested for back-end developers is generating a microservices oriented API. database is the name of the database created on the previous episode. The CXF Swagger2Feature allows you to generate Swagger 2. In this example, we’ve added three scopes (admin, user and media) to our OauthSecurity security definitionUsing security definitions. 0 license) supports the latest version of the OpenAPI spec (3. xml to generate client automatically:. GitHub Gist: star and fork eiselems's gists by creating an account on GitHub. @EnableSwagger2 — This will enable the swagger configuration during application startup. 2' compile group: 'io. Springfox is a project that aims at creating automated JSON API documentation for API’s built with Spring and is used in the following tutorial to integrate Swagger into a sample application. Due to the non-alphanumeric characters, a name like this is invalid for an OpenAPI Specification. 0 specification. This framework generate a Swagger - JSON file for each project that we have. Here, I will cover Springfox integration with my REST Hello World project. Sometimes we can get java. 2 documents, you can use SwaggerFeature instead of Swagger2Feature. It specifies the format of the REST web services including URL, Resources, methods, etc. Swagger Editor. In this tutorial, you will learn using Swagger and SpringFox to create REST API Documentation in Spring Boot. Besides, this application includes Springfox Swagger so the REST API endpoints are documented and accessible through this tool. For example, "application/json, application/xml" would suggest this API Resource accepts JSON and XML input. Is there a way i can remove the "basic-error-controller" from springfox swagger-ui? CMSDK - Content Management System Development Kit For example if your parent. Over the past few years, Swagger 2 has become the de facto standard for defining or documenting your API. For this sample, you can use the. Some approaches generate the AsciiDoc within a test (see Springfox example or Swagger2Markup example). The Swagger 2 specification, which is known as OpenAPI specification, has several implementations. 2 and older) is popular for Spring Boot applications. Every city had its own time calculation, which meant that there were over 300 different time zones across the country. These source code samples are taken from different open source projects. Do not forget to change the password in the URL. The default Spring MVC template from Swagger codegen was a good start. The parameter spring. I solved removing com. By merely existing on the Java classpath, seven “gadget” classes in Apache Commons Collections (versions 3. As the official website of Swagger says :. I'm running JDK 8 and the project leverages Gradle. It can also be used to override the @Consumes values for the Swagger documentation. Springfox is an implementation for Swagger. Enabling Springfox in a Spring Boot / Spring Data REST application. io/specification/). RESTful API Documentation Using Swagger and Spring MVC With the advancement of web technologies and different ways to implement them, there have been many different schools of thought about how to make it easy for end users and to address different challenges into the space of web. First of all, we need a Spring Boot project as an example:. GET, produces = MediaType. x or Maven 3. For generating Swagger 1. In order to setup Swagger UI with the project, we will use Springfox library. 如上代码所示,通过@Configuration注解,让Spring来加载该类配置。再通过@EnableSwagger2注解来启用Swagger2。 再通过createRestApi函数创建Docket的Bean之后,apiInfo()用来创建该Api的基本信息(这些基本信息会展现在文档页面中)。. I'm running JDK 8 and the project leverages Gradle. AWS S3 Image Upload + Swagger + Spring Boot + User Login and Registration Example. These examples are extracted from open source projects. If you have any questions the gitter channel is always open :) Re: Swagger › Integrating swagger with Spring 3. Swagger is one of the most popular specifications for REST APIs for a number of reasons: * Swagger generates an interactive API console for people to quickly learn about and try the API. You can use this parameter to set a different validator URL, for example for locally deployed validators ( Validator Badge ). json or /swagger. It uses version 2 of the Swagger specification. ApiInfoBuilder. Also the demo applications serve as an example. 0 Is it possible to define an API icon in the Swagger 2. 整合SpringFox-Swagger. Generate code with Java 8's inteface default instead of a plain class. We are going to use Springfox to produce two versions of the docs: Swagger schema in JSON; more human-approachable documentation rendered by Swagger UI. Besides, this application includes Springfox Swagger so the REST API endpoints are documented and accessible through this tool. Download the source code. It is simple to use. Swagger is an open source software to build standard documentation in a human readable format for REST APIs. There are a few tools which can help us document our API. SpringFox 2. While integrating with hybris, hybris server throws following excepti. Spring and Swagger. The Docket helps to configure a subset of the services to be documented and group them by a name, etc. Anyone found any good ways or practices to making Swagger work better with Kotlin. Example of Spring Rest, Spring Data JPA, and H2 to create restful services endpoints with Spring Boot. Trong bài viết này, chúng ta hãy cùng nhau tìm hiểu cách tạo RESTful API document sử dụng Springfox cho Swagger trong Spring Boot các bạn nhé! Đầu tiên, chúng ta cần một Spring Boot project để làm ví dụ:. We will in this blog see how to implement the Open API. RESTFul Services Principe Richardson Maturity Model Design Patterns Data Formats Documentation, Validation Frameworks Swagger, JAX-RS (JavaEE), Springfox. See below for details. Is there a way i can remove the "basic-error-controller" from springfox swagger-ui? CMSDK - Content Management System Development Kit For example if your parent. First need to add maven dependency for springfox-swagger2. For this article, we will use the Springfox implementation of the Swagger 2 specification. I tried version 2. Takes in comma-separated values of content types.