Skip to content

Swagger2/Open API Swagger UI support request #105

@quantum-fusion

Description

@quantum-fusion

Updated to reflect results of deep dive

  • Framework version: 0.9.1
  • Implementations: Spring Boot

Scenario

  • Servlet request handler cannot work with wrapper responses:
javax.servlet.ServletException: java.lang.ClassCastException: org.springframework.boot.web.support.ErrorPageFilter$ErrorWrapperResponse cannot be cast to com.amazonaws.serverless.proxy.internal.servlet.AwsHttpServletResponse
at 
  • Servlet forward fails for spring boot default error pages, response buffer is already flushed

Original issue description

I am interested in having Swagger2 support for Swagger UI with Sam local running Lambda SpringBoot.
https://springframework.guru/spring-boot-restful-api-documentation-with-swagger-2/

I tried to add the Swagger UI, however there is a conflict with SAM local security and the server times out, because of security authentication that fails.

It appears that the SAM Local security conflicts with the Swagger2 UI security being disabled, and the SAM Local security proxy wins, therefore disabling Swagger2 UI.

Expected behavior

This example shows the Swagger UI being enabled in this Spring Boot project.

1.)
https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra

Actual behavior

This Lambda example shows that the Swagger UI is disabled, in this SpringBoot project.
2.)
https://github.com/quantum-fusion/aws-serverless-java-container/blob/master/samples/springboot/pet-store/README.md

Steps to reproduce

Run both springboot projects both 1.) and 2.)

Full log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions