The inso generate config command generates a configuration from an API specification by using openapi-2-kong. The command works similarly to generating a declarative configuration file or Kubernetes manifest from within Insomnia.
For more in-depth information on working with other Kong products, see:
inso generate config [identifier]
identifier is a specification name, or id, or a file path.
| Option | Alias | Description | 
|---|---|---|
| --type <type> | -t | type of configuration to generate, options are kubernetesanddeclarative(default:declarative) | 
| --output <path> | -o | save the generated config to a file in the working directory. The default output is yaml. Change the output type tojsonfor typedeclarativewith the--formatoption. | 
| --format | -f | output format, either yamlorjson. This option only applies to typedeclarative, and will be ignored for typekubernetes(default:yaml) | 
| --tags <tags> | comma-separated list of tags to apply to each entity | 
The following commands work when running in the example git-repo directory.
When you don’t specify any arguments, you’ll be prompted with:
inso generate config
Scope configuration generation by the Document name or ID:
inso generate config spc_46c5a4
inso generate config "Sample Specification"
Scope configuration generation by a file on the filesystem:
inso generate config spec.yaml
inso generate config spec.yaml --workingDir another/dir
Save the configuration output to a file:
inso generate config spc_46c5a4 --output output.yaml
inso generate config spc_46c5a4 > output.yaml
Save the configuration output to a file with json output:
inso generate config spc_46c5a4 --output output.json --format json
Add tags to your generated configuration:
inso generate config spec.yaml --workingDir another/dir
inso generate config spec.yaml --tags first
inso generate config spec.yaml --tags "first,second"
Change the generated configuration output type to either declarative or kubernetes:
inso generate config spc_46c5a4 --type declarative
inso generate config "Sample Specification" --type kubernetes