1

Swagger UI (quarkus-smallrye-openapi) is not working with quarkus AWS lambda application.

swagger-ui-bundle.js is not loading and results in an 502 error:

enter image description here

/q/swagger-ui/swagger-ui-bundle.js

I am using '2.7.5.Final'. I have seen that some docs says that 'swagger-ui-bundle.js' is too big. This link tells that react reduce the bundle size but how can we solve this in a quarkus java lambda application.

But it is working fine in local.

Can any one please help me on it. Thanks.

I have tried with "quarkus-smallrye-openapi" in my quarkus lambda application. The swagger documentation is good in local but not in remote environment. I expect the same behavior as local in remote environment as well.

Naga Syamala
  • 41
  • 1
  • 5

1 Answers1

1

Do not really have a solution specifically for Java. Though we had similar issue in .net and fixed this by configuring .net to recognize the http Accept-Encoding gzip incoming header and compressing the response in the .net middleware before sending it back through the lambda. Typically the compressed response may be 8 to 10 times smaller putting you easily under the AWS limit. Modern browsers will typically always send the Accept-Encoding gzip and others when requesting data.

We expose our endpoint through an application load balancer. We initially attempted to use an API Gateway and had big issues there because it screws around with the incoming and outgoing headers and the .net middleware never saw the incoming Accept-Encoding gzip request.

Ron L
  • 11
  • 1
  • Is there any way to get swagger documentation for quarkus AWS lamda application in production? I still have the same issue which summary same and it is good in my local. Thanks – Naga Syamala May 11 '23 at 20:41