Automatically Generate OpenAPI specs for my APIs

Hello folks!

I have a few questions about OpenAPI specification management in Kong. I find very little info about:

  • Is it possible to generate them from Kong automatically?
  • If not, where am I supposed to store & manage them? Or maybe import them?
  • How to access them through the Kong’s API?

Would love some insights on those topics,


I don’t know if you can auto generate them in Kong but if you have a yaml or json spec, you can import it when you create the product version (you have to scroll down a bit and it will say import version spec).

Then you can access the spec in the dev portal after you publish both the API Product and the Product Version that has the imported Version Spec. But when I execute an endpoint that has a matching route, I get “Please enable JS” as an error.

@iCarossio - Usually, your spec is the only content you create manually based on your API needs (Spec first design). You can use insomnia for designing this spec which confirms to OAS standards. You store them in git for version control.

Once you have the specs, you can use automated process like deck cli tools available in Kong for automating the generation of Kong entities.

You can also inject custom kong attributes in your API spec to generate advanced kong specific entities like plugins.