aws / aws/serverless-java-container
Swagger file generation on Spring Boot lambda
- Lenguaje dominante
- Java
- Estrellas
- 1.6k
- Forks
- 574
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
* 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")
})
```
Guía de contribución
Línea de trabajo
Comienza revisando Swagger2Config y las asignaciones de controladores anotadas descritas en el issue; después, inspecciona cómo se implementa la aplicación Spring Boot como una Lambda. Determina si la Lambda implementada puede exponer swagger-ui.html y define una ruta de acceso verificable; se considera completado cuando Swagger UI es accesible después de la implementación o se documenta la limitación admitida.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- aws, java, spring-boot
- Área
- api, backend, cloud
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100