deck file openapi2kong broken for swagger 2.0
- Dominant language
- Go
- Stars
- 503
- Forks
- 137
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 20
Description
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)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with `deck file openapi2kong` and the linked petstore-expanded.yaml Swagger 2.0 specification, then trace the document-model conversion that reports an OAS2 version mismatch. Done means the command successfully processes Swagger 2.0 input without the reported error and the behavior is covered by a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, openapi
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100