Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.springfox:springfox:3.0.0'
}
dependencies {
implementation("com.github.springfox:springfox:3.0.0")
}
<dependency>
<groupId>com.github.springfox</groupId>
<artifactId>springfox</artifactId>
<version>3.0.0</version>
</dependency>
libraryDependencies += "com.github.springfox" % "springfox" % "3.0.0"
:dependencies [[com.github.springfox/springfox "3.0.0"]]
| Build Status | Coverage | Code Analysis |
|---|---|---|
||
|
|
| Sonar Cloud |
|------------ |
||
|
|
|
|
|
|
|
|
|
|
For more information on this project visit the Springfox Website or http://springfox.github.io/springfox/
For Maven
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
For Gradle
implementation "io.springfox:springfox-boot-starter:<version>"
NOTE: Would love feedback to make this better
1. Remove explicit dependencies on springfox-swagger2
2. Remove any @EnableSwagger2...
annotations
3. Add the springfox-boot-starter
dependency
4. Springfox 3.x removes dependencies on guava and other 3rd party libraries (not zero dep yet! depends on spring plugin
and open api libraries for annotations and models) so if you used guava predicates/functions those will need to
transition to java 8 function interfaces.
NOTE: Would love feedback to make this better
1. Remove explicit dependencies on springfox-swagger2
2. Remove the @EnableSwagger2
annotations
3. Add the springfox-boot-starter
dependency
4. Springfox 3.x removes dependencies on guava and other 3rd party libraries (not zero dep yet! depends on spring plugin
and open api libraries for annotations and models) so if you used guava predicates/functions those will need to
transition to java 8 function interfaces
5. If you are using WebMvc but you don't use the @EnableWebMvc
annotation yet, add this annotation.
NOTE: Would love feedback to make this experience better
1. Remove explicit dependencies on springfox-swagger2
2. Add @EnableOpenApi
for open API (and @EnableSwagger2WebMvc
or @EnableSwagger2WebFlux
for older versions)
3. Added the springfox-oas
library
4. Springfox 3.x removes dependencies on guava and other 3rd party libraries (not zero dep yet! depends on spring plugin
and open api libraries for annotations and models) so if you used guava predicates/functions those will need to
transition to java 8 function interfaces
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.