Skip to content

Replace kin-openapi with pb33f/libopenapi for OpenAPI parsing#2299

Open
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/replacing-kin-openapi-with-alternative-l-02c2dda9
Open

Replace kin-openapi with pb33f/libopenapi for OpenAPI parsing#2299
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/replacing-kin-openapi-with-alternative-l-02c2dda9

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Mar 31, 2026

Summary

Replace github.com/getkin/kin-openapi with github.com/pb33f/libopenapi (Apache 2.0).

kin-openapi versions above v0.132.0 lack a valid license, making it a dead-end dependency. libopenapi provides full OpenAPI 3.0/3.1 support and is actively maintained.

Changes

  • pkg/tools/builtin/openapi.go — Rewrite OpenAPI parsing to use libopenapi's high-level V3 data model (Document, PathItem, Operation, SchemaProxy, etc.). Add yamlNodeToValue() helper to preserve native types (int, float, bool) for enum and default values.
  • pkg/tools/builtin/openapi_test.go — Add TestOpenAPITool_EnumAndDefaultTypes to verify type preservation for enum and default schema values.
  • go.mod/go.sum — Remove kin-openapi and its transitive deps, add libopenapi.
  • .agents/skills/bump-go-dependencies/SKILL.md — Remove the "never bump kin-openapi" warning.

Security

External reference resolution remains disabled by default (libopenapi sets AllowFileReferences=false and AllowRemoteReferences=false), matching the previous kin-openapi behavior.

kin-openapi versions above v0.132.0 lack a valid license, making it a
dead-end dependency. Replace it with pb33f/libopenapi (Apache 2.0),
which provides full OpenAPI 3.0/3.1 support and is actively maintained.

Key changes:
- Rewrite pkg/tools/builtin/openapi.go to use libopenapi's high-level
  V3 data model (Document, PathItem, Operation, SchemaProxy, etc.)
- Remove kin-openapi and its transitive dependencies from go.mod
- Remove the "never bump kin-openapi" warning from the
  bump-go-dependencies skill since the dependency no longer exists

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner March 31, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant