Kong / deck

decK: Configuration management and drift detection for Kong
https://docs.konghq.com/deck/overview
Apache License 2.0
445 stars 130 forks source link

deck file openapi2kong broken for swagger 2.0 #1414

Open io-timeout opened 1 month ago

io-timeout commented 1 month ago

As of version 1.39.5 deck file openapi2kong fails to process swagger 2.0 specifications. This was working in 1.39.4 and prior. This is still broken in 1.40.3.

The error reported is:

2024/10/09 10:40:16 "msg"="error while building v3 document model \n" "error"="unable to build openapi document, supplied spec is a different version (oas2). Try 'BuildV2Model()'"
Error: failed converting OpenAPI spec 'petstore.yaml'; cannot create v3 model from document: 1 errors reported

(Tested using https://raw.githubusercontent.com/OAI/OpenAPI-Specification/refs/heads/main/examples/v2.0/yaml/petstore-expanded.yaml)