aws / aws/serverless-java-container
Swagger file generation on Spring Boot lambda
- Lingua principale
- Java
- Stelle
- 1.6k
- Fork
- 574
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
* Implementations: Spring Boot
## Scenario
I have annotated my spring boot 2 lambda with a Swagger2Config so that it auto-generates a Swagger-file for the annotated methods in the controller. Is there a way to access the swagger-ui.html after deploying the lambda? The annotated request mapping are reacheable just fine.
## Steps to reproduce
Add these maven dependencies to your spring boot 2 mvn lambda:
```
io.springfox
springfox-swagger2
2.6.1
compile
io.springfox
springfox-swagger-ui
2.6.1
compile
```
Add a Swagger2Config file and annotate the controller methods with Swagger annotations.
```
@RequestMapping(path = "/categories", method = RequestMethod.POST)
@ApiOperation(value="Add a new category",response=Category.class)
@ApiResponses(value={
@ApiResponse(code=200,message="Category created successfully",response=Category.class, responseContainer="List"),
@ApiResponse(code=500,message="Internal server error")
})
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.