aws / aws/serverless-java-container
Swagger file generation on Spring Boot lambda
- 主要言語
- Java
- スター
- 1.6k
- フォーク
- 574
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
* 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")
})
```
コントリビューションガイド
評価
この issue はまだ評価されていません。