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.
You can configure this plugin using the
Kong Admin API
or through declarative configuration, which involves directly editing
the Kong configuration file.
Enabling the plugin on a Service
<service> is the
name of the Service that this plugin
configuration will target.
Note: The legacy API entity has been deprecated in favor of Services
CE 0.13.0 and
Enabling the plugin on a Route
<route> is the
name of the Route that this plugin configuration
Enabling 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.