From 5c0764127dd404d54b9e2b5f22a17f70b928dd28 Mon Sep 17 00:00:00 2001 From: Sasha Melentyev Date: Thu, 10 Feb 2022 17:04:10 +0300 Subject: [PATCH] feat(extension): add hardcode extensions back --- extensions.go | 6 ------ schema.go | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 extensions.go diff --git a/extensions.go b/extensions.go deleted file mode 100644 index d808367..0000000 --- a/extensions.go +++ /dev/null @@ -1,6 +0,0 @@ -package openapi - -type Extensions struct { - Example string `json:"x-example,omitempty" yaml:"x-example,omitempty"` - Faker string `json:"x-faker,omitempty" yaml:"x-faker,omitempty"` -} diff --git a/schema.go b/schema.go index b04dd01..4f5e9b8 100644 --- a/schema.go +++ b/schema.go @@ -6,8 +6,6 @@ import ( // Schema -. type Schema struct { - Extensions - Properties Schemas `json:"properties,omitempty" yaml:"properties,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` Format string `json:"format,omitempty" yaml:"format,omitempty"` @@ -16,6 +14,7 @@ type Schema struct { Required []string `json:"required,omitempty" yaml:"required,omitempty"` Items *Schema `json:"items,omitempty" yaml:"items,omitempty"` Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"` + Faker string `json:"x-faker,omitempty" yaml:"x-faker,omitempty"` } // IsRef -.