com.github.sparkmuse:swagger2-spring-boot-starter

This project autoconfigure Swagger in a Springboot application.

License

License

Categories

Categories

Spring Boot Container Microservices Swagger Program Interface REST Frameworks
GroupId

GroupId

com.github.sparkmuse
ArtifactId

ArtifactId

swagger2-spring-boot-starter
Last Version

Last Version

1.1.50
Release Date

Release Date

Type

Type

jar
Description

Description

com.github.sparkmuse:swagger2-spring-boot-starter
This project autoconfigure Swagger in a Springboot application.
Project URL

Project URL

https://github.com/sparkmuse/swagger2-spring-boot-starter
Source Code Management

Source Code Management

https://github.com/sparkmuse/swagger2-spring-boot-starter

Download swagger2-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.sparkmuse/swagger2-spring-boot-starter/ -->
<dependency>
    <groupId>com.github.sparkmuse</groupId>
    <artifactId>swagger2-spring-boot-starter</artifactId>
    <version>1.1.50</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.sparkmuse/swagger2-spring-boot-starter/
implementation 'com.github.sparkmuse:swagger2-spring-boot-starter:1.1.50'
// https://jarcasting.com/artifacts/com.github.sparkmuse/swagger2-spring-boot-starter/
implementation ("com.github.sparkmuse:swagger2-spring-boot-starter:1.1.50")
'com.github.sparkmuse:swagger2-spring-boot-starter:jar:1.1.50'
<dependency org="com.github.sparkmuse" name="swagger2-spring-boot-starter" rev="1.1.50">
  <artifact name="swagger2-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.sparkmuse', module='swagger2-spring-boot-starter', version='1.1.50')
)
libraryDependencies += "com.github.sparkmuse" % "swagger2-spring-boot-starter" % "1.1.50"
[com.github.sparkmuse/swagger2-spring-boot-starter "1.1.50"]

Dependencies

compile (6)

Group / Artifact Type Version
io.springfox : springfox-swagger2 jar 2.9.2
io.springfox : springfox-swagger-ui jar 2.9.2
org.springframework.boot : spring-boot jar
org.springframework.boot : spring-boot-autoconfigure jar
org.springframework.boot : spring-boot-configuration-processor Optional jar
org.projectlombok : lombok Optional jar 1.18.12

test (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar
org.springframework.boot : spring-boot-starter-web jar

Project Modules

There are no modules declared in this project.

Swagger2 Springboot Starter

Build Status Quality Gate Status Coverage Maven Central

Starter to autoconfigure Swagger2 for Springboot. The project focuses on getting the user to use Swagger as soon as possible with the least amount of configuration.

Usage

All needed to start using the project is to add the dependency to the POM and that's it.

<dependency>
    <groupId>com.github.sparkmuse</groupId>
    <artifactId>swagger2-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>

Extra configuration

Add a file bellow to change the default configurations as needed.

swagger:
  group: Main group
  path-ant-expressions: /api/**,/foo/**
  api-info:
    title: Api Title
    description: My awesome description
    version: 1.0
    terms-of-service-url: url
    license: ApiInfo License
    license-url: Licence Url
    contact:
      name: Contact Name
      url: contact-url.com
      email: [email protected]

Note: Notice there is no space between the ant expressions in the ant paths

The auto-configuration processor will enhance the existing configuration with the new ones added. You need to override only what's needed. So if the only change needed is the name of the contact then the configuration bellow will suffice.

swagger:
  api-info:
    contact:
      name: Awesome new name

Security

Security can be easily configured. We support three types out of the box: basic, api, oauth

Basic

swagger:
  security:
    basic: true

Api

swagger:
  security:
    api:
      key-name: key
      vehicle: header

OAuth

swagger:
  security:
    oauth:
      scopes:
        - read
        - write
      token-request:
        client-secret-name: secret
        client-id-name: id
        url: /authorize
      token:
        url: /token
        token-name: token

Versions

Version
1.1.50
1.1.49
1.1.48
1.1.47
1.1.46
1.1.45
1.1.40
1.1.36
1.1.35
1.1.34
1.1.33
1.1.27
1.1.18
1.1.17
1.0.0