Community Plugin: This plugin is developed, tested, and maintained by a third-party contributor.
This plugin will expose the OpenAPI Spec (OAS), Swagger, or other specification of auth protected API services fronted by the Kong gateway.
API providers need a means of exposing the specifications of their services while maintaining authentication on the service itself - this plugin solves this problem by:
Plugin enables Kong Admin to specify the endpoint of their API specification.
Plugin will validate the Proxy request is GET method, and will validate the proxy request ends with “/specz”. If these two requirements are met, the endpoint will return the specification of the API Service with Content-Type header identical to what the API Service exposes.
$ luarocks install kong-spec-expose
$ git clone https://github.com/Optum/kong-spec-expose.git /path/to/kong/plugins/kong-spec-expose
$ cd /path/to/kong/plugins/kong-spec-expose
$ luarocks make *.rockspec
Feel free to open issues, or refer to our Contribution Guidelines if you have any questions.
This plugin is compatible with DB-less mode.
In DB-less mode, you configure Kong Gateway declaratively.
Therefore, the Admin API is mostly read-only. The only tasks it can perform are all
related to handling the declarative config, including:
- setting a target's health status in the load balancer
- validating configurations against schemas
- uploading the declarative configuration using the
Enable the plugin on a service
Enable the plugin on a route
Enable the plugin globally
A plugin which is not associated to any service, route, or consumer is
considered global, and will be run on every request. Read the
Plugin Reference and the Plugin Precedence
sections for more information.
Here's a list of all the parameters which can be used in this plugin's configuration:
|The name of the plugin to use, in this case
|The ID of the Service the plugin targets.
|The ID of the Route the plugin targets.
|Whether this plugin will be applied.
|The ID of the API the plugin targets.
Note: The API Entity is deprecated in favor of Services since CE 0.13.0 and EE 0.32.
The full path to the specification/documentation of your service.