aws / aws/serverless-java-container
Swagger file generation on Spring Boot lambda
- Langage dominant
- Java
- Étoiles
- 1.6k
- Forks
- 574
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
* 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")
})
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par examiner Swagger2Config et les mappings de contrôleurs annotés décrits dans l’issue, puis inspectez comment l’application Spring Boot est déployée en tant que Lambda. Déterminez si la Lambda déployée peut exposer swagger-ui.html et définissez un chemin d’accès vérifiable ; le travail est considéré comme terminé lorsque Swagger UI est accessible après le déploiement ou que la limitation prise en charge est documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, java, spring-boot
- Domaine
- api, backend, cloud
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 30/100