Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

swagger-ui returns 500 after deployment

Out of the box configuration works perfectly on my machine, no problems at all.

But when I deploy to our test environment - I get the following message

500 : { "Message": "An error has occurred." } /api/swagger/docs/v1

enter image description here The deployment is to default web site/api

Im guessing it has something to do with the baseUrl or something like that, but I have no idea of even where to begin.

My routes work fine within the project - I can call all my webapi endpoints and they respond correctly.

any help would be much appreciated

like image 815
VisualBean Avatar asked Nov 25 '15 11:11

VisualBean


People also ask

How do I fix swagger internal server error?

HTTP 500 (Internal Server Error) is a generalized error message. To get more specific details regarding those failures, please set logging level to "data" for that respective port under "Settings > Dynamic" on API Gateway Manager. Then, run the ReST call again and check the traffic log.

What is swagger stack overflow?

Swagger is a framework implementation for describing, producing, consuming, and visualizing RESTful web services, based on the OpenAPI specification.

Is swagger auto generated?

You can write a Swagger spec for your API manually, or have it generated automatically from annotations in your source code.

Can we customize swagger UI?

You can define custom layouts in order to have high-level control over what ends up on the page. By default, Swagger UI uses BaseLayout , which is built into the application. You can specify a different layout to be used by passing the layout's name as the layout parameter to Swagger UI.


1 Answers

When debugging I was using the debug config (Which I had generated XmlComments for: Properties -> build tab -> Output -> XML Documentation File)

I had not done this for my release configuration (duh...) - now everything works

like image 178
VisualBean Avatar answered Sep 22 '22 08:09

VisualBean