Migrate from getkin/kin-openapi to oasdiff/kin-openapi fork#1187
Draft
Migrate from getkin/kin-openapi to oasdiff/kin-openapi fork#1187
Conversation
This migration is required to upgrade oasdiff to v1.12.x+, which switched to using their own fork of kin-openapi for OpenAPI 3.1 and source location tracking support. Changes: - Replace all github.com/getkin/kin-openapi imports with github.com/oasdiff/kin-openapi - Update go.mod to use oasdiff/oasdiff@v1.12.3 and oasdiff/kin-openapi@v0.136.0 - Fix breaking API changes: - Discriminator.Mapping now uses MappingRef structs instead of strings - ParametersDiff, ResponsesDiff, SchemasDiff moved to ComponentsDiff - OperationsDiff.Added/Deleted changed from StringList to []string - StringsDiff.Added/Deleted changed to []string Closes blocked dependabot PRs for kin-openapi and oasdiff upgrades. See: oasdiff/oasdiff#810
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates from
github.com/getkin/kin-openapitogithub.com/oasdiff/kin-openapi(the oasdiff fork). This migration is required to upgrade oasdiff to v1.12.x+.Background
As of oasdiff v1.12.0 (March 2026), oasdiff permanently switched to using their own fork of kin-openapi (
github.com/oasdiff/kin-openapi). This was done to add Source Location Tracking and OpenAPI 3.1 support without waiting for upstream PRs.The two libraries are incompatible at runtime - attempting to use both causes type mismatches at compile time due to transitive dependencies through
oasdiff/yaml.Changes
Import Path Changes (57 files)
github.com/getkin/kin-openapiimports withgithub.com/oasdiff/kin-openapigo.mod Updates
github.com/oasdiff/oasdiff@v1.12.3github.com/oasdiff/kin-openapi@v0.136.0github.com/getkin/kin-openapiAPI Breaking Changes Fixed
kin-openapi v0.134.0+:
Discriminator.Mappingchanged frommap[string]stringtomap[string]MappingRefoasdiff v1.12.x:
ParametersDiff,ResponsesDiff,SchemasDiffmoved from rootDiffstruct toDiff.ComponentsDiffOperationsDiff.Added/Deletedchanged fromutils.StringListto[]stringStringsDiff.Added/Deletedchanged to[]stringTesting
Related Issues
References
Pull Request opened by Augment Code with guidance from the PR author