Kong Declarative Config (for decK)
Note: This feature is currently only available on Design Documents with OpenAPI 3.0 specifications.
Insomnia creates a preformatted decK file when you add endpoints to a Document. You can do this through the UI, as explained below. Or by using the Inso CLI command inso generate config.
You can also upload a Declarative Config file directly to your Kong Gateway instance. Learn how from the Kong Docs Loading the Declarative Configuration File.
Get a Declarative Config File Through Insomnia
- Open a Document.
- Add an OpenAPI 3.0 Specification. If you have another Swagger version, use a tool like editor.swagger.io to convert to OpenAPI 3.0.
- Click on the arrow next to the Document name.
- In the dropdown menu, click Declarative Config.
Authentication in Declarative Config
The generated Declarative Configuration file contains authentication plugin information.
openid-connect, as seen in the example screenshot below, is only compatible with Kong Gateway Enterprise. Ensure you define authentication that’s compatible with your Kong Gateway instance.
See Security Plugins in the OpenAPI 2 Kong Declarative Config for a list of authentication types and their corresponding plugins.
We use OpenAPI 2 Kong Declarative Config to generate the Declarative Config file.