Skip to content

Automated JSON API documentation for API's built with Spring

License

Notifications You must be signed in to change notification settings

robertblust/springfox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Springfox

Join the chat at https://gitter.im/springfox/springfox Download Project Stats Stories in Ready

Build Status Coverage
Circle CI codecov

Install current dev version

You must start to build project :

./gradlew clean build publishToMavenLocal -i -x test

To use it on you spring project you must add 4 dependencies :

  • io.springfox:springfox-swagger2:2.9.0-SNAPSHOT
  • io.springfox:springfox-spring-webflux:2.9.0-SNAPSHOT
  • io.springfox:springfox-swagger-ui:2.9.0-SNAPSHOT
  • org.webjars:webjars-locator:0.32

And a this beans :

@Configuration
@EnableSwagger2WebFlux
class SwaggerConfiguration extends WebFluxConfigurationSupport {

  @Bean
  public Jackson2JsonEncoder jackson2JsonEncoder(ObjectMapper mapper) {
      return new Jackson2JsonEncoder(mapper)
  }

  @Bean 
  public Jackson2JsonDecoder jackson2JsonDecoder(ObjectMapper mapper) {
      return new Jackson2JsonDecoder(mapper)
  }

  @Override
  protected void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry.addResourceHandler("/**").addResourceLocations("classpath:META-INF/resources/")
  }

}

About

For more information on this project visit the Springfox Website or http://springfox.github.io/springfox/

Useful links

Transitioning to 2.x

Here is some preliminary documentation to help transition to 2.x

License

Copyright 2015 Marty Pitt - @martypitt, Dilip Krishnan - @dilipkrish, Adrian Kelly - @adrianbk,

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Automated JSON API documentation for API's built with Spring

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 50.2%
  • Java 46.0%
  • JavaScript 1.5%
  • HTML 1.2%
  • CSS 1.1%