Re-import declarative config

Hello,
I’m using Kong 2.1 in DB mode and I would like to use an OpenAPI specification as the single source of truth for my service and the Kong API Gateway. There is openapi-2-kong which transforms an OpenAPI spec to a Kong declarative config. Using kong config db_import I can import this generated config into Kong.

My problem is: When the OpenAPI spec changes and I transform it again to a Kong config, I cannot db_import this new config again into Kong. It yields a primary key violation.

I could reset the database, bootstrap it again and run db_import then. But this would also erase other data which might have been added through the Admin API (consumers, keys, rate limits, …).

What would be the right way to go for my scenario? Is there a way to merge a new config into Kong?


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ