aws / aws/serverless-java-container
Swagger file generation on Spring Boot lambda
- Ngôn ngữ chính
- Java
- Star
- 1.6k
- Fork
- 574
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
* 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")
})
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xem xét Swagger2Config và các ánh xạ controller có chú thích được mô tả trong issue, sau đó kiểm tra cách ứng dụng Spring Boot được triển khai dưới dạng Lambda. Xác định liệu Lambda đã triển khai có thể cung cấp swagger-ui.html hay không và xác định một đường dẫn truy cập có thể kiểm chứng; được xem là hoàn tất khi Swagger UI có thể truy cập sau khi triển khai hoặc giới hạn được hỗ trợ đã được tài liệu hóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, java, spring-boot
- Lĩnh vực
- api, backend, cloud
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100