Membrane API Gateway returns 500 Internal Server Error with the detail Error creating OpenAPI publisher! when the apiDocs plugin cannot create the publisher that renders the API overview and the Swagger UI. This points to a broken installation or a bug in Membrane, not to the client or to your OpenAPI documents.
The response contains the status 500 Internal Server Error, the detail Error creating OpenAPI publisher!, the problem type https://membrane-api.io/problems/internal and a link to this page. The type internal means that the gateway failed while processing the exchange.
The apiDocs plugin publishes an overview of the APIs deployed from OpenAPI documents, together with a Swagger UI. See API Docs Publisher. The HTML for these pages comes from two templates that ship inside the Membrane jar. When the publisher is created, both templates are loaded and compiled.
The template resources /openapi/swagger-ui.html or /openapi/overview.html are not on the classpath, for example because the Membrane jar was repackaged or trimmed.
The Groovy template engine that compiles the templates could not load or compile them, for example because a library is missing from the classpath.
error level.openapi resources are included.By default, Membrane runs in development mode and adds details to error responses that help you find the problem, including the link to this page. These details may reveal information about your setup. In production, turn them off:
configuration:
production: trueconfiguration: production: true
Add the configuration document to your apis.yaml and separate it from the APIs with ---.
In production mode, the title of this error is replaced by Internal Server Error, and the response only says Internal details are hidden. See server log (key: ...). Search the gateway log for that key to find the full error message.
Configuration reference:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.