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")
})
```
贡献指南
调研方向
Start by reviewing the Swagger2Config and the annotated controller mappings described in the issue, then inspect how the Spring Boot application is deployed as a Lambda. Determine whether the deployed Lambda can expose swagger-ui.html and define a verifiable access path; done means the Swagger UI is reachable after deployment or the supported limitation is documented.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- aws, java, spring-boot
- 领域
- api, backend, cloud
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100