https://github.com/bliblidotcom/swagger2-plugin
Swagger Plugin for Spring Boot 2 WebFlux
https://github.com/bliblidotcom/swagger2-plugin
java open-api spring-boot spring-boot2 spring-webflux swagger
Last synced: 9 months ago
JSON representation
Swagger Plugin for Spring Boot 2 WebFlux
- Host: GitHub
- URL: https://github.com/bliblidotcom/swagger2-plugin
- Owner: bliblidotcom
- Created: 2020-01-17T08:02:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-19T14:51:10.000Z (almost 6 years ago)
- Last Synced: 2025-01-23T16:10:52.377Z (11 months ago)
- Topics: java, open-api, spring-boot, spring-boot2, spring-webflux, swagger
- Language: Java
- Size: 60.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Swagger Plugin for Spring Boot 2 WebFlux
This is plugin integrate swagger on Spring Boot 2 WebFlux project. This project is not working on Spring Web MVC.
## How to use it
Add dependency
```xml
com.blibli.oss
swagger-plugin2
...
```
And this plugin will automatically scan all your controller
You can access your swagger ui on `http://localhost:8080/swagger-ui.html`
## Global Parameter
Sometimes you want to add global parameter (configure once, and use everywhere). You can use this by register your custom `io.swagger.v3.oas.models.parameters.Parameter` bean. Example :
```java
@Configuration
public class YourConfiguration {
@Bean
public Parameter queryChannelId() {
return new QueryParameter()
.name("channelId")
.example("channelId")
.required(true);
}
}
```
After that, you can use your parameter using `@io.swagger.v3.oas.annotations.Parameter(name="uniqueName", ref="beanName")` annotation, example :
```java
@RestController
public class ExampleController {
@GetMapping("/")
@Parameter(name = "queryChannelId", ref = "queryChannelId")
public Mono home() {
return Mono.just("Home");
}
}
```
## Ignore Parameter