aws / aws/serverless-java-container

Swagger file generation on Spring Boot lambda

オープン
#338 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。