Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c8b2b90
fix: strip __origin__ from Encoding and Variables maps
reuvenharrison Mar 16, 2026
23e4e36
docs: update API docs and changelog for Encodings and ServerVariables…
reuvenharrison Mar 16, 2026
a09d176
style: run go fmt on encoding and server files
reuvenharrison Mar 16, 2026
04ac044
chore: update yaml and yaml3 to fix panic on empty mapping in sequence
reuvenharrison Mar 16, 2026
d256ed5
chore: update yaml and yaml3 to v0.0.0-20260316
reuvenharrison Mar 16, 2026
6bbb22e
fix: prevent false positive diffs (#806) and panic on empty mapping i…
reuvenharrison Mar 16, 2026
322dd54
chore: update yaml and yaml3 to v0.0.1
reuvenharrison Mar 16, 2026
a9c7141
fix: rename module path to github.com/oasdiff/kin-openapi
reuvenharrison Mar 16, 2026
51b58b9
Merge pull request #3 from oasdiff/fix/issue-810-module-rename
reuvenharrison Mar 16, 2026
6411927
chore: sync with upstream getkin/kin-openapi master
reuvenharrison Mar 17, 2026
697d4b9
fix: strip __origin__ from slices in example values
tvisser-hartwig Mar 18, 2026
35356fd
chore: bump yaml and yaml3 to v0.0.3 (#5)
reuvenharrison Mar 30, 2026
6ca500d
chore: remove alias regression test (fix lives in yaml3) (#6)
reuvenharrison Mar 30, 2026
ada8d2d
bump: yaml and yaml3 to v0.0.4 — preserve __origin__ in alias-expande…
reuvenharrison Mar 31, 2026
5b3b723
Merge pull request #7 from oasdiff/bump/yaml-v0.0.4
reuvenharrison Mar 31, 2026
96bea04
Merge pull request #4 from tvisser-hartwig/fix/strip-origin-from-slices
reuvenharrison Mar 31, 2026
d0253c3
fix: strip __origin__ from extension values to prevent spurious diffs
reuvenharrison Mar 31, 2026
c5cbf48
Merge pull request #8 from oasdiff/fix/strip-extensions-origin
reuvenharrison Mar 31, 2026
a34d0de
fix: move IncludeOrigin to Loader field — eliminates concurrent-reque…
reuvenharrison Apr 2, 2026
498005a
feat: parse compact []any origin sequence format from yaml3
reuvenharrison Apr 2, 2026
1bf705c
feat: update originFromSeq for file-at-index-0 format, add Origin.Unm…
reuvenharrison Apr 2, 2026
56430f0
Merge pull request #9 from oasdiff/perf/origin-tree-apply
reuvenharrison Apr 2, 2026
cf971e5
chore: bump yaml to v0.0.7, yaml3 to v0.0.5
reuvenharrison Apr 2, 2026
07cd08a
Merge pull request #10 from oasdiff/bump/yaml-v0.0.7
reuvenharrison Apr 2, 2026
fd9dc09
fix: parse sequence item value in originFromSeq for named Location lo…
reuvenharrison Apr 2, 2026
a2f8799
chore: bump yaml3 to v0.0.6 (sequence item value encoding)
reuvenharrison Apr 2, 2026
9a1815e
Merge pull request #11 from oasdiff/bump/yaml-v0.0.7
reuvenharrison Apr 2, 2026
d1f8901
cleanup: remove dead origin-stripping code now handled by extractOrigins
reuvenharrison Apr 4, 2026
4223b71
chore: merge upstream/master — resolve conflicts in our favor
reuvenharrison Apr 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/docs/openapi2.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package openapi2 // import "github.com/getkin/kin-openapi/openapi2"
package openapi2 // import "github.com/oasdiff/kin-openapi/openapi2"

Package openapi2 parses and writes OpenAPIv2 specification documents.

Expand Down
2 changes: 1 addition & 1 deletion .github/docs/openapi2conv.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package openapi2conv // import "github.com/getkin/kin-openapi/openapi2conv"
package openapi2conv // import "github.com/oasdiff/kin-openapi/openapi2conv"

Package openapi2conv converts an OpenAPI v2 specification document to v3.

Expand Down
2 changes: 1 addition & 1 deletion .github/docs/openapi3.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package openapi3 // import "github.com/getkin/kin-openapi/openapi3"
package openapi3 // import "github.com/oasdiff/kin-openapi/openapi3"

Package openapi3 parses and writes OpenAPI 3 specification documents.

Expand Down
2 changes: 1 addition & 1 deletion .github/docs/openapi3filter.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package openapi3filter // import "github.com/getkin/kin-openapi/openapi3filter"
package openapi3filter // import "github.com/oasdiff/kin-openapi/openapi3filter"

Package openapi3filter validates that requests and inputs request an OpenAPI 3
specification file.
Expand Down
2 changes: 1 addition & 1 deletion .github/docs/openapi3gen.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package openapi3gen // import "github.com/getkin/kin-openapi/openapi3gen"
package openapi3gen // import "github.com/oasdiff/kin-openapi/openapi3gen"

Package openapi3gen generates OpenAPIv3 JSON schemas from Go types.

Expand Down
2 changes: 1 addition & 1 deletion .github/docs/routers.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package routers // import "github.com/getkin/kin-openapi/routers"
package routers // import "github.com/oasdiff/kin-openapi/routers"


VARIABLES
Expand Down
2 changes: 1 addition & 1 deletion .github/docs/routers_gorillamux.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gorillamux // import "github.com/getkin/kin-openapi/routers/gorillamux"
package gorillamux // import "github.com/oasdiff/kin-openapi/routers/gorillamux"

Package gorillamux implements a router.

Expand Down
2 changes: 1 addition & 1 deletion .github/docs/routers_legacy.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package legacy // import "github.com/getkin/kin-openapi/routers/legacy"
package legacy // import "github.com/oasdiff/kin-openapi/routers/legacy"

Package legacy implements a router.

Expand Down
2 changes: 1 addition & 1 deletion .github/docs/routers_legacy_pathpattern.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pathpattern // import "github.com/getkin/kin-openapi/routers/legacy/pathpattern"
package pathpattern // import "github.com/oasdiff/kin-openapi/routers/legacy/pathpattern"

Package pathpattern implements path matching.

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ for _, path := range doc.Paths.InMatchingOrder() {

## CHANGELOG: Sub-v1 breaking API changes

### v0.136.0
* Module renamed from `github.com/getkin/kin-openapi` to `github.com/oasdiff/kin-openapi`. Update all imports accordingly: `openapi2`, `openapi2conv`, `openapi3`, `openapi3filter`, `openapi3gen`, `routers`, `routers/gorillamux`, `routers/legacy`, `routers/legacy/pathpattern`

### v0.135.0
* `openapi3.MediaType.Encoding` field type changed from `map[string]*Encoding` to `Encodings`
* `openapi3.Server.Variables` field type changed from `map[string]*ServerVariable` to `ServerVariables`
Expand Down
6 changes: 3 additions & 3 deletions cmd/validate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/oasdiff/yaml"

"github.com/getkin/kin-openapi/openapi2"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi3"
)

var (
Expand All @@ -36,7 +36,7 @@ func main() {
flag.Parse()
filename := flag.Arg(0)
if len(flag.Args()) != 1 || filename == "" {
log.Fatalf("Usage: go run github.com/getkin/kin-openapi/cmd/validate@latest [--circular] [--defaults] [--examples] [--ext] [--patterns] -- <local YAML or JSON file>\nGot: %+v\n", os.Args)
log.Fatalf("Usage: go run github.com/oasdiff/kin-openapi/cmd/validate@latest [--circular] [--defaults] [--examples] [--ext] [--patterns] -- <local YAML or JSON file>\nGot: %+v\n", os.Args)
}

data, err := os.ReadFile(filename)
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/getkin/kin-openapi
module github.com/oasdiff/kin-openapi

go 1.22.5

require (
github.com/go-openapi/jsonpointer v0.21.0
github.com/gorilla/mux v1.8.0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/oasdiff/yaml v0.0.4
github.com/oasdiff/yaml3 v0.0.4
github.com/oasdiff/yaml v0.0.7
github.com/oasdiff/yaml3 v0.0.6
github.com/perimeterx/marshmallow v1.1.5
github.com/stretchr/testify v1.9.0
github.com/woodsbury/decimal128 v1.3.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/oasdiff/yaml v0.0.4 h1:airPco4LbUoK4nbVwu+wwkRg2WarLC96cgBhgN93fsE=
github.com/oasdiff/yaml v0.0.4/go.mod h1:EaJ6/lcrRLK+syawtvtrHdbrrln4/SUmQw6aBTIlaMs=
github.com/oasdiff/yaml3 v0.0.4 h1:U5RTQZpBmsbcyCFlzPVuMctk6Jme6lOrbl0jJoOovMw=
github.com/oasdiff/yaml3 v0.0.4/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
github.com/oasdiff/yaml v0.0.7 h1:r/BR4tqb+W/5fSV6RknYrfBa+PSZnRRvZ/nUnDdepFQ=
github.com/oasdiff/yaml v0.0.7/go.mod h1:EaJ6/lcrRLK+syawtvtrHdbrrln4/SUmQw6aBTIlaMs=
github.com/oasdiff/yaml3 v0.0.6 h1:459QJwIK3pqFs91pIbH/XxCld0ugHd4/F8xHkFjaJPo=
github.com/oasdiff/yaml3 v0.0.6/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
2 changes: 1 addition & 1 deletion openapi2/marsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func unmarshalError(jsonUnmarshalErr error) error {
func unmarshal(data []byte, v any) error {
var jsonErr, yamlErr error

// See https://github.com/getkin/kin-openapi/issues/680
// See https://github.com/oasdiff/kin-openapi/issues/680
if jsonErr = json.Unmarshal(data, v); jsonErr == nil {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion openapi2/openapi2.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openapi2
import (
"encoding/json"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

// T is the root of an OpenAPI v2 document
Expand Down
2 changes: 1 addition & 1 deletion openapi2/openapi2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/oasdiff/yaml"

"github.com/getkin/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi2"
)

func Example() {
Expand Down
2 changes: 1 addition & 1 deletion openapi2/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openapi2
import (
"encoding/json"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

type Operation struct {
Expand Down
2 changes: 1 addition & 1 deletion openapi2/parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"sort"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

type Parameters []*Parameter
Expand Down
2 changes: 1 addition & 1 deletion openapi2/path_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"net/http"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

type PathItem struct {
Expand Down
2 changes: 1 addition & 1 deletion openapi2/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openapi2
import (
"encoding/json"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

type Response struct {
Expand Down
4 changes: 2 additions & 2 deletions openapi2/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"strings"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

type (
Expand Down Expand Up @@ -260,7 +260,7 @@ func (schema *Schema) UnmarshalJSON(data []byte) error {
*schema = Schema(x)

if schema.Format == "date" {
// This is a fix for: https://github.com/getkin/kin-openapi/issues/697
// This is a fix for: https://github.com/oasdiff/kin-openapi/issues/697
if eg, ok := schema.Example.(string); ok {
schema.Example = strings.TrimSuffix(eg, "T00:00:00Z")
}
Expand Down
2 changes: 1 addition & 1 deletion openapi2/security_scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openapi2
import (
"encoding/json"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

type SecurityRequirements []map[string][]string
Expand Down
2 changes: 1 addition & 1 deletion openapi2conv/issue1016_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"testing"

"github.com/getkin/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions openapi2conv/issue1069_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

"github.com/getkin/kin-openapi/openapi2"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi3"
"github.com/oasdiff/yaml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion openapi2conv/issue1091_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/getkin/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi2"
)

func TestIssue1091_PropertyExtensions(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions openapi2conv/issue187_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/oasdiff/yaml"
"github.com/stretchr/testify/require"

"github.com/getkin/kin-openapi/openapi2"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi3"
)

func v2v3JSON(spec2 []byte) (doc3 *openapi3.T, err error) {
Expand Down
4 changes: 2 additions & 2 deletions openapi2conv/issue440_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/getkin/kin-openapi/openapi2"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi3"
)

func TestIssue440(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions openapi2conv/issue979_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/getkin/kin-openapi/openapi2"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi3"
)

func TestIssue979(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions openapi2conv/openapi2_conv.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sort"
"strings"

"github.com/getkin/kin-openapi/openapi2"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi3"
)

// ToV3 converts an OpenAPIv2 spec to an OpenAPIv3 spec
Expand Down
4 changes: 2 additions & 2 deletions openapi2conv/openapi2_conv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/getkin/kin-openapi/openapi2"
"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi2"
"github.com/oasdiff/kin-openapi/openapi3"
)

func TestConvOpenAPIV3ToV2(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion openapi3/additionalProperties_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/oasdiff/yaml3"
"github.com/stretchr/testify/require"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
)

func TestMarshalAdditionalProperties(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion openapi3/callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ func (callback *Callback) Validate(ctx context.Context, opts ...ValidationOption

// UnmarshalJSON sets Callbacks to a copy of data.
func (callbacks *Callbacks) UnmarshalJSON(data []byte) (err error) {
*callbacks, _, err = unmarshalStringMapP[CallbackRef](data)
*callbacks, err = unmarshalStringMapP[CallbackRef](data)
return
}
2 changes: 0 additions & 2 deletions openapi3/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ func (components *Components) UnmarshalJSON(data []byte) error {
return unmarshalError(err)
}
_ = json.Unmarshal(data, &x.Extensions)
delete(x.Extensions, originKey)
stripExtensionsOrigin(x.Extensions)
delete(x.Extensions, "schemas")
delete(x.Extensions, "parameters")
delete(x.Extensions, "headers")
Expand Down
2 changes: 0 additions & 2 deletions openapi3/contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ func (contact *Contact) UnmarshalJSON(data []byte) error {
}
_ = json.Unmarshal(data, &x.Extensions)

delete(x.Extensions, originKey)
stripExtensionsOrigin(x.Extensions)
delete(x.Extensions, "name")
delete(x.Extensions, "url")
delete(x.Extensions, "email")
Expand Down
2 changes: 1 addition & 1 deletion openapi3/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ func (content Content) Validate(ctx context.Context, opts ...ValidationOption) e

// UnmarshalJSON sets Content to a copy of data.
func (content *Content) UnmarshalJSON(data []byte) (err error) {
*content, _, err = unmarshalStringMapP[MediaType](data)
*content, err = unmarshalStringMapP[MediaType](data)
return
}
2 changes: 0 additions & 2 deletions openapi3/discriminator.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ func (discriminator *Discriminator) UnmarshalJSON(data []byte) error {
}
_ = json.Unmarshal(data, &x.Extensions)

delete(x.Extensions, originKey)
stripExtensionsOrigin(x.Extensions)
delete(x.Extensions, "propertyName")
delete(x.Extensions, "mapping")
if len(x.Extensions) == 0 {
Expand Down
4 changes: 1 addition & 3 deletions openapi3/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type Encodings map[string]*Encoding

// UnmarshalJSON sets Encodings to a copy of data, stripping __origin__ metadata.
func (encodings *Encodings) UnmarshalJSON(data []byte) (err error) {
*encodings, _, err = unmarshalStringMapP[Encoding](data)
*encodings, err = unmarshalStringMapP[Encoding](data)
return
}

Expand Down Expand Up @@ -91,8 +91,6 @@ func (encoding *Encoding) UnmarshalJSON(data []byte) error {
}
_ = json.Unmarshal(data, &x.Extensions)

delete(x.Extensions, originKey)
stripExtensionsOrigin(x.Extensions)
delete(x.Extensions, "contentType")
delete(x.Extensions, "headers")
delete(x.Extensions, "style")
Expand Down
5 changes: 1 addition & 4 deletions openapi3/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ func (example *Example) UnmarshalJSON(data []byte) error {
return unmarshalError(err)
}
_ = json.Unmarshal(data, &x.Extensions)
delete(x.Extensions, originKey)
stripExtensionsOrigin(x.Extensions)
delete(x.Extensions, "summary")
delete(x.Extensions, "description")
delete(x.Extensions, "value")
Expand All @@ -70,7 +68,6 @@ func (example *Example) UnmarshalJSON(data []byte) error {
x.Extensions = nil
}
*example = Example(x)
example.Value = stripOriginFromAny(example.Value)
return nil
}

Expand All @@ -90,6 +87,6 @@ func (example *Example) Validate(ctx context.Context, opts ...ValidationOption)

// UnmarshalJSON sets Examples to a copy of data.
func (examples *Examples) UnmarshalJSON(data []byte) (err error) {
*examples, _, err = unmarshalStringMapP[ExampleRef](data)
*examples, err = unmarshalStringMapP[ExampleRef](data)
return
}
2 changes: 1 addition & 1 deletion openapi3/example_refs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openapi3_test
import (
"testing"

"github.com/getkin/kin-openapi/openapi3"
"github.com/oasdiff/kin-openapi/openapi3"
"github.com/stretchr/testify/require"
)

Expand Down
Loading