D: [iurt_root_command] chroot Building target platforms: noarch Building for target noarch Installing /home/iurt/rpmbuild/SRPMS/@2245911:golang-github-openapi-spec-0.20.0-3.mga10.src.rpm Executing(%mkbuilddir): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.DN5WKI Executing(%prep): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.BMeiGp + umask 022 + cd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + cd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build + rm -rf spec-0.20.0 + /usr/lib/rpm/rpmuncompress -x /home/iurt/rpmbuild/SOURCES/spec-0.20.0.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd spec-0.20.0 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + rm -fr /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/vendor + [[ ! -e /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/bin ]] + install -m 0755 -vd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/bin install: creating directory '/home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build' install: creating directory '/home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/bin' + export GOPATH=/home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build:/usr/share/gocode + GOPATH=/home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build:/usr/share/gocode + [[ ! -e /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec ]] ++ dirname /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec + install -m 0755 -vd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi install: creating directory '/home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src' install: creating directory '/home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com' install: creating directory '/home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi' + ln -fs /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0 /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec + cd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.Miav41 + umask 022 + cd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build + '[' 1 -eq 1 ']' + '[' /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/BUILDROOT '!=' / ']' + rm -rf /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/BUILDROOT ++ dirname /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/BUILDROOT + mkdir -p /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build + mkdir /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/BUILDROOT + cd spec-0.20.0 + '[' 1 -eq 1 ']' + cd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec + IFS= + gosupfiles= + mapfile -t gosupfilesA + go-rpm-integration install -i github.com/go-openapi/spec -b /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/bin -s /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build -o golang-github-openapi-spec-devel.file-list -O /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0 -V 0.20.0-3.mga10 -p /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/BUILDROOT -g /usr/share/gocode -r '.*example.*' Installing: github.com/go-openapi/spec + IFS= +++ realpath -e --relative-base=. CODE_OF_CONDUCT.md README.md +++ sort -u ++ listfiles_include=$'CODE_OF_CONDUCT.md\nREADME.md' ++ echo $'CODE_OF_CONDUCT.md\nREADME.md' + godocs=$'CODE_OF_CONDUCT.md\nREADME.md' + [[ -n CODE_OF_CONDUCT.md README.md ]] + IFS= + read -r f + echo %doc '"CODE_OF_CONDUCT.md"' + IFS= + read -r f + echo %doc '"README.md"' + IFS= + read -r f + IFS= +++ realpath -e --relative-base=. LICENSE +++ sort -u ++ listfiles_include=LICENSE ++ echo LICENSE + golicenses=LICENSE + [[ -n LICENSE ]] + IFS= + read -r f + echo %license '"LICENSE"' + IFS= + read -r f + /usr/lib/rpm/check-buildroot + '[' -n '' ']' + /usr/share/spec-helper/clean_files + '[' -n '' ']' + /usr/share/spec-helper/compress_files .xz + '[' -n '' ']' + /usr/share/spec-helper/relink_symlinks + '[' -n '' ']' + /usr/share/spec-helper/clean_perl + '[' -n '' ']' + /usr/share/spec-helper/lib_symlinks + '[' -n '' ']' + /usr/share/spec-helper/gprintify + '[' -n '' ']' + /usr/share/spec-helper/fix_mo + '[' -n '' ']' + /usr/share/spec-helper/fix_pamd + '[' -n '' ']' + /usr/share/spec-helper/remove_info_dir + '[' -n '' ']' + /usr/share/spec-helper/fix_eol + '[' -n '' ']' + /usr/share/spec-helper/check_desktop_files + '[' -n '' ']' + /usr/share/spec-helper/check_elf_files + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/brp-remove-la-files + /usr/lib/rpm/redhat/brp-mangle-shebangs + env -u SOURCE_DATE_EPOCH /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j16 + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.wmixgM + umask 022 + cd /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build + cd spec-0.20.0 + '[' 1 -eq 1 ']' + GO_LDFLAGS=' -X github.com/go-openapi/spec/version=0.20.0' + GO_TEST_FLAGS='-buildmode pie -compiler gc' + GO_TEST_EXT_LD_FLAGS='-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,--build-id=sha1 -Wl,--enable-new-dtags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' + go-rpm-integration check -i github.com/go-openapi/spec -b /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/bin -s /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build -V 0.20.0-3.mga10 -p /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/BUILDROOT -g /usr/share/gocode -r '.*example.*' Testing in: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src PATH: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/bin:/usr/local/bin:/usr/bin:/usr/local/games:/usr/games:/usr/local/sbin:/usr/sbin:/home/iurt/.local/bin:/home/iurt/bin GOPATH: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build:/usr/share/gocode GO111MODULE: off command: go test -buildmode pie -compiler gc -ldflags " -X github.com/go-openapi/spec/version=0.20.0 -extldflags '-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,--build-id=sha1 -Wl,--enable-new-dtags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" testing: github.com/go-openapi/spec github.com/go-openapi/spec --- FAIL: TestRelativeBaseURI (0.02s) expander_test.go:1136: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1136 Error: Received unexpected error: Get "http://127.0.0.1:43481/pet/pet.json": dial tcp 127.0.0.1:43481: connect: network is unreachable Test: TestRelativeBaseURI expander_test.go:1142: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1142 Error: Received unexpected error: Get "http://127.0.0.1:43481/pet/pet.json": dial tcp 127.0.0.1:43481: connect: network is unreachable Test: TestRelativeBaseURI expander_test.go:1146: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1146 Error: Received unexpected error: Get "http://127.0.0.1:43481/pet/pet.json": dial tcp 127.0.0.1:43481: connect: network is unreachable Test: TestRelativeBaseURI expander_test.go:1148: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1148 Error: Not equal: expected: spec.Parameter{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, CommonValidations:spec.CommonValidations{Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil)}, SimpleSchema:spec.SimpleSchema{Type:"string", Nullable:false, Format:"", Items:(*spec.Items)(nil), CollectionFormat:"", Default:interface {}(nil), Example:interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, ParamProps:spec.ParamProps{Description:"", Name:"", In:"query", Required:false, Schema:(*spec.Schema)(nil), AllowEmptyValue:false}} actual : spec.Parameter{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x40001db710), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"parameters", "tag"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}}, CommonValidations:spec.CommonValidations{Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil)}, SimpleSchema:spec.SimpleSchema{Type:"", Nullable:false, Format:"", Items:(*spec.Items)(nil), CollectionFormat:"", Default:interface {}(nil), Example:interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, ParamProps:spec.ParamProps{Description:"", Name:"", In:"", Required:false, Schema:(*spec.Schema)(nil), AllowEmptyValue:false}} Diff: --- Expected +++ Actual @@ -4,5 +4,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=15) "/parameters/tag", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=10) "parameters", + (string) (len=3) "tag" + } }, @@ -10,3 +25,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -31,3 +46,3 @@ SimpleSchema: (spec.SimpleSchema) { - Type: (string) (len=6) "string", + Type: (string) "", Nullable: (bool) false, @@ -45,3 +60,3 @@ Name: (string) "", - In: (string) (len=5) "query", + In: (string) "", Required: (bool) false, Test: TestRelativeBaseURI expander_test.go:1149: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1149 Error: Not equal: expected: spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"pet response", Schema:(*spec.Schema)(0x4000178b48), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} actual : spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"pet response", Schema:(*spec.Schema)(0x400014c6c8), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} Diff: --- Expected +++ Actual @@ -26,8 +26,23 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) (len=12) "pet/pet.json", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=16) "/definitions/pet", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=3) "pet" + } }, HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, + HasURLPathOnly: (bool) true, HasFragmentOnly: (bool) false, @@ -58,6 +73,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -67,196 +79,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI expander_test.go:1151: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1151 Error: Not equal: expected: spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"pet response", Schema:(*spec.Schema)(0x4000178b48), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} actual : spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000322000), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"responses", "anotherPet"}}, HasFullURL:true, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:true}}}, ResponseProps:spec.ResponseProps{Description:"", Schema:(*spec.Schema)(nil), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} Diff: --- Expected +++ Actual @@ -4,7 +4,22 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) (len=4) "http", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) (len=15) "127.0.0.1:43481", + Path: (string) (len=13) "/pet/pet.json", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=21) "/responses/anotherPet", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=9) "responses", + (string) (len=10) "anotherPet" + } }, - HasFullURL: (bool) false, + HasFullURL: (bool) true, HasURLPathOnly: (bool) false, @@ -12,3 +27,3 @@ HasFileScheme: (bool) false, - HasFullFilePath: (bool) false + HasFullFilePath: (bool) true } @@ -17,261 +32,4 @@ ResponseProps: (spec.ResponseProps) { - Description: (string) (len=12) "pet response", - Schema: (*spec.Schema)({ - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) , - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }), + Description: (string) "", + Schema: (*spec.Schema)(), Headers: (map[string]spec.Header) , Test: TestRelativeBaseURI expander_test.go:1153: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1153 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"id", "name"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"id":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int64", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "name":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "tag":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x40001dbe60), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "pet"}}, HasFullURL:false, HasURLPathOnly:true, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,8 +8,23 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) (len=12) "pet/pet.json", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=16) "/definitions/pet", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=3) "pet" + } }, HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, + HasURLPathOnly: (bool) true, HasFragmentOnly: (bool) false, @@ -40,6 +55,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -49,196 +61,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI expander_test.go:1154: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1154 Error: Not equal: expected: spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"", Schema:(*spec.Schema)(0x400014cb48), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} actual : spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x40007794d0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"responses", "stringResponse"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"", Schema:(*spec.Schema)(nil), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} Diff: --- Expected +++ Actual @@ -4,5 +4,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=25) "/responses/stringResponse", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=9) "responses", + (string) (len=14) "stringResponse" + } }, @@ -10,3 +25,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -18,66 +33,3 @@ Description: (string) "", - Schema: (*spec.Schema)({ - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }), + Schema: (*spec.Schema)(), Headers: (map[string]spec.Header) , Test: TestRelativeBaseURI expander_test.go:1155: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1155 Error: Not equal: expected: spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"pet response", Schema:(*spec.Schema)(0x4000178b48), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} actual : spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000779c20), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"responses", "anotherPet"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"", Schema:(*spec.Schema)(nil), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} Diff: --- Expected +++ Actual @@ -4,5 +4,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=21) "/responses/anotherPet", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=9) "responses", + (string) (len=10) "anotherPet" + } }, @@ -10,3 +25,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -17,261 +32,4 @@ ResponseProps: (spec.ResponseProps) { - Description: (string) (len=12) "pet response", - Schema: (*spec.Schema)({ - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) , - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }), + Description: (string) "", + Schema: (*spec.Schema)(), Headers: (map[string]spec.Header) , Test: TestRelativeBaseURI expander_test.go:1156: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1156 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"id", "name"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"id":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int64", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "name":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "tag":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000284ab0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "pet"}}, HasFullURL:false, HasURLPathOnly:true, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,8 +8,23 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) (len=12) "pet/pet.json", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=16) "/definitions/pet", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=3) "pet" + } }, HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, + HasURLPathOnly: (bool) true, HasFragmentOnly: (bool) false, @@ -40,6 +55,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -49,196 +61,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI expander_test.go:1157: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1157 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"code", "message"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"code":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int32", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "message":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x40002853b0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "errorModel"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,5 +8,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=23) "/definitions/errorModel", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=10) "errorModel" + } }, @@ -14,3 +29,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -40,6 +55,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=4) "code", - (string) (len=7) "message" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -49,132 +61,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=2) { - (string) (len=4) "code": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int32", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=7) "message": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI expander_test.go:1158: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1158 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"id", "name"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"id":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int64", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "name":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "tag":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000269050), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "pet"}}, HasFullURL:false, HasURLPathOnly:true, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,8 +8,23 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) (len=12) "pet/pet.json", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=16) "/definitions/pet", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=3) "pet" + } }, HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, + HasURLPathOnly: (bool) true, HasFragmentOnly: (bool) false, @@ -40,6 +55,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -49,196 +61,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI expander_test.go:1159: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1159 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema{spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000269050), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "pet"}}, HasFullURL:false, HasURLPathOnly:true, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"name"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"id":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int64", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x400042c990), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "petInput"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,5 +8,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=21) "/definitions/petInput", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=8) "petInput" + } }, @@ -14,3 +29,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -42,210 +57,3 @@ Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) (len=2) { - (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)({ - Scheme: (string) "", - Opaque: (string) "", - User: (*url.Userinfo)(), - Host: (string) "", - Path: (string) (len=12) "pet/pet.json", - RawPath: (string) "", - OmitHost: (bool) false, - ForceQuery: (bool) false, - RawQuery: (string) "", - Fragment: (string) (len=16) "/definitions/pet", - RawFragment: (string) "" - }), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) (len=2) { - (string) (len=11) "definitions", - (string) (len=3) "pet" - } - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) true, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) , - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) , - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) (len=1) { - (string) (len=4) "name" - }, - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=1) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + AllOf: ([]spec.Schema) , OneOf: ([]spec.Schema) , Test: TestRelativeBaseURI expander_test.go:1160: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1160 Error: Not equal: expected: spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"pet response", Schema:(*spec.Schema)(0x4000178b48), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} actual : spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x400042d050), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"responses", "petResponse"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"", Schema:(*spec.Schema)(nil), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} Diff: --- Expected +++ Actual @@ -4,5 +4,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=22) "/responses/petResponse", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=9) "responses", + (string) (len=11) "petResponse" + } }, @@ -10,3 +25,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -17,261 +32,4 @@ ResponseProps: (spec.ResponseProps) { - Description: (string) (len=12) "pet response", - Schema: (*spec.Schema)({ - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) , - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }), + Description: (string) "", + Schema: (*spec.Schema)(), Headers: (map[string]spec.Header) , Test: TestRelativeBaseURI expander_test.go:1161: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1161 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"code", "message"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"code":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int32", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "message":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x400042d7a0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "errorModel"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,5 +8,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=23) "/definitions/errorModel", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=10) "errorModel" + } }, @@ -14,3 +29,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -40,6 +55,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=4) "code", - (string) (len=7) "message" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -49,132 +61,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=2) { - (string) (len=4) "code": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int32", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=7) "message": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI expander_test.go:1163: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1163 Error: Not equal: expected: spec.Parameter{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, CommonValidations:spec.CommonValidations{Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil)}, SimpleSchema:spec.SimpleSchema{Type:"integer", Nullable:false, Format:"int64", Items:(*spec.Items)(nil), CollectionFormat:"", Default:interface {}(nil), Example:interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, ParamProps:spec.ParamProps{Description:"ID of pet to fetch", Name:"id", In:"path", Required:true, Schema:(*spec.Schema)(nil), AllowEmptyValue:false}} actual : spec.Parameter{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000487dd0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"parameters", "idParam"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}}, CommonValidations:spec.CommonValidations{Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil)}, SimpleSchema:spec.SimpleSchema{Type:"", Nullable:false, Format:"", Items:(*spec.Items)(nil), CollectionFormat:"", Default:interface {}(nil), Example:interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, ParamProps:spec.ParamProps{Description:"", Name:"", In:"", Required:false, Schema:(*spec.Schema)(nil), AllowEmptyValue:false}} Diff: --- Expected +++ Actual @@ -4,5 +4,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=19) "/parameters/idParam", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=10) "parameters", + (string) (len=7) "idParam" + } }, @@ -10,3 +25,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -31,5 +46,5 @@ SimpleSchema: (spec.SimpleSchema) { - Type: (string) (len=7) "integer", + Type: (string) "", Nullable: (bool) false, - Format: (string) (len=5) "int64", + Format: (string) "", Items: (*spec.Items)(), @@ -43,6 +58,6 @@ ParamProps: (spec.ParamProps) { - Description: (string) (len=18) "ID of pet to fetch", - Name: (string) (len=2) "id", - In: (string) (len=4) "path", - Required: (bool) true, + Description: (string) "", + Name: (string) "", + In: (string) "", + Required: (bool) false, Schema: (*spec.Schema)(), Test: TestRelativeBaseURI expander_test.go:1164: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1164 Error: Not equal: expected: spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"pet response", Schema:(*spec.Schema)(0x4000178b48), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} actual : spec.Response{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x40004066c0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"responses", "petResponse"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}}, ResponseProps:spec.ResponseProps{Description:"", Schema:(*spec.Schema)(nil), Headers:map[string]spec.Header(nil), Examples:map[string]interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}} Diff: --- Expected +++ Actual @@ -4,5 +4,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=22) "/responses/petResponse", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=9) "responses", + (string) (len=11) "petResponse" + } }, @@ -10,3 +25,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -17,261 +32,4 @@ ResponseProps: (spec.ResponseProps) { - Description: (string) (len=12) "pet response", - Schema: (*spec.Schema)({ - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) , - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=2) "id", - (string) (len=4) "name" - }, - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=3) { - (string) (len=2) "id": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int64", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=4) "name": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=3) "tag": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }), + Description: (string) "", + Schema: (*spec.Schema)(), Headers: (map[string]spec.Header) , Test: TestRelativeBaseURI expander_test.go:1165: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1165 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"code", "message"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"code":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int32", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "message":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000406ab0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "errorModel"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,5 +8,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=23) "/definitions/errorModel", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=10) "errorModel" + } }, @@ -14,3 +29,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -40,6 +55,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=4) "code", - (string) (len=7) "message" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -49,132 +61,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=2) { - (string) (len=4) "code": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int32", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=7) "message": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI expander_test.go:1166: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1166 Error: Not equal: expected: spec.Parameter{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}}, CommonValidations:spec.CommonValidations{Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil)}, SimpleSchema:spec.SimpleSchema{Type:"integer", Nullable:false, Format:"int64", Items:(*spec.Items)(nil), CollectionFormat:"", Default:interface {}(nil), Example:interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, ParamProps:spec.ParamProps{Description:"ID of pet to fetch", Name:"id", In:"path", Required:true, Schema:(*spec.Schema)(nil), AllowEmptyValue:false}} actual : spec.Parameter{Refable:spec.Refable{Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x40004075f0), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"parameters", "idParam"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}}, CommonValidations:spec.CommonValidations{Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil)}, SimpleSchema:spec.SimpleSchema{Type:"", Nullable:false, Format:"", Items:(*spec.Items)(nil), CollectionFormat:"", Default:interface {}(nil), Example:interface {}(nil)}, VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, ParamProps:spec.ParamProps{Description:"", Name:"", In:"", Required:false, Schema:(*spec.Schema)(nil), AllowEmptyValue:false}} Diff: --- Expected +++ Actual @@ -4,5 +4,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=19) "/parameters/idParam", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=10) "parameters", + (string) (len=7) "idParam" + } }, @@ -10,3 +25,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -31,5 +46,5 @@ SimpleSchema: (spec.SimpleSchema) { - Type: (string) (len=7) "integer", + Type: (string) "", Nullable: (bool) false, - Format: (string) (len=5) "int64", + Format: (string) "", Items: (*spec.Items)(), @@ -43,6 +58,6 @@ ParamProps: (spec.ParamProps) { - Description: (string) (len=18) "ID of pet to fetch", - Name: (string) (len=2) "id", - In: (string) (len=4) "path", - Required: (bool) true, + Description: (string) "", + Name: (string) "", + In: (string) "", + Required: (bool) false, Schema: (*spec.Schema)(), Test: TestRelativeBaseURI expander_test.go:1167: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1167 Error: Not equal: expected: spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string{"code", "message"}, Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties{"code":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"integer"}, Nullable:false, Format:"int32", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}, "message":spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(nil), referencePointer:jsonpointer.Pointer{referenceTokens:[]string(nil)}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:false, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray{"string"}, Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)}}, AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} actual : spec.Schema{VendorExtensible:spec.VendorExtensible{Extensions:spec.Extensions(nil)}, SchemaProps:spec.SchemaProps{ID:"", Ref:spec.Ref{Ref:jsonreference.Ref{referenceURL:(*url.URL)(0x4000778090), referencePointer:jsonpointer.Pointer{referenceTokens:[]string{"definitions", "errorModel"}}, HasFullURL:false, HasURLPathOnly:false, HasFragmentOnly:true, HasFileScheme:false, HasFullFilePath:false}}, Schema:"", Description:"", Type:spec.StringOrArray(nil), Nullable:false, Format:"", Title:"", Default:interface {}(nil), Maximum:(*float64)(nil), ExclusiveMaximum:false, Minimum:(*float64)(nil), ExclusiveMinimum:false, MaxLength:(*int64)(nil), MinLength:(*int64)(nil), Pattern:"", MaxItems:(*int64)(nil), MinItems:(*int64)(nil), UniqueItems:false, MultipleOf:(*float64)(nil), Enum:[]interface {}(nil), MaxProperties:(*int64)(nil), MinProperties:(*int64)(nil), Required:[]string(nil), Items:(*spec.SchemaOrArray)(nil), AllOf:[]spec.Schema(nil), OneOf:[]spec.Schema(nil), AnyOf:[]spec.Schema(nil), Not:(*spec.Schema)(nil), Properties:spec.SchemaProperties(nil), AdditionalProperties:(*spec.SchemaOrBool)(nil), PatternProperties:spec.SchemaProperties(nil), Dependencies:spec.Dependencies(nil), AdditionalItems:(*spec.SchemaOrBool)(nil), Definitions:spec.Definitions(nil)}, SwaggerSchemaProps:spec.SwaggerSchemaProps{Discriminator:"", ReadOnly:false, XML:(*spec.XMLObject)(nil), ExternalDocs:(*spec.ExternalDocumentation)(nil), Example:interface {}(nil)}, ExtraProps:map[string]interface {}(nil)} Diff: --- Expected +++ Actual @@ -8,5 +8,20 @@ Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), + referenceURL: (*url.URL)({ + Scheme: (string) "", + Opaque: (string) "", + User: (*url.Userinfo)(), + Host: (string) "", + Path: (string) "", + RawPath: (string) "", + OmitHost: (bool) false, + ForceQuery: (bool) false, + RawQuery: (string) "", + Fragment: (string) (len=23) "/definitions/errorModel", + RawFragment: (string) "" + }), referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) + referenceTokens: ([]string) (len=2) { + (string) (len=11) "definitions", + (string) (len=10) "errorModel" + } }, @@ -14,3 +29,3 @@ HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, + HasFragmentOnly: (bool) true, HasFileScheme: (bool) false, @@ -40,6 +55,3 @@ MinProperties: (*int64)(), - Required: ([]string) (len=2) { - (string) (len=4) "code", - (string) (len=7) "message" - }, + Required: ([]string) , Items: (*spec.SchemaOrArray)(), @@ -49,132 +61,3 @@ Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) (len=2) { - (string) (len=4) "code": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=7) "integer" - }, - Nullable: (bool) false, - Format: (string) (len=5) "int32", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - }, - (string) (len=7) "message": (spec.Schema) { - VendorExtensible: (spec.VendorExtensible) { - Extensions: (spec.Extensions) - }, - SchemaProps: (spec.SchemaProps) { - ID: (string) "", - Ref: (spec.Ref) { - Ref: (jsonreference.Ref) { - referenceURL: (*url.URL)(), - referencePointer: (jsonpointer.Pointer) { - referenceTokens: ([]string) - }, - HasFullURL: (bool) false, - HasURLPathOnly: (bool) false, - HasFragmentOnly: (bool) false, - HasFileScheme: (bool) false, - HasFullFilePath: (bool) false - } - }, - Schema: (spec.SchemaURL) "", - Description: (string) "", - Type: (spec.StringOrArray) (len=1) { - (string) (len=6) "string" - }, - Nullable: (bool) false, - Format: (string) "", - Title: (string) "", - Default: (interface {}) , - Maximum: (*float64)(), - ExclusiveMaximum: (bool) false, - Minimum: (*float64)(), - ExclusiveMinimum: (bool) false, - MaxLength: (*int64)(), - MinLength: (*int64)(), - Pattern: (string) "", - MaxItems: (*int64)(), - MinItems: (*int64)(), - UniqueItems: (bool) false, - MultipleOf: (*float64)(), - Enum: ([]interface {}) , - MaxProperties: (*int64)(), - MinProperties: (*int64)(), - Required: ([]string) , - Items: (*spec.SchemaOrArray)(), - AllOf: ([]spec.Schema) , - OneOf: ([]spec.Schema) , - AnyOf: ([]spec.Schema) , - Not: (*spec.Schema)(), - Properties: (spec.SchemaProperties) , - AdditionalProperties: (*spec.SchemaOrBool)(), - PatternProperties: (spec.SchemaProperties) , - Dependencies: (spec.Dependencies) , - AdditionalItems: (*spec.SchemaOrBool)(), - Definitions: (spec.Definitions) - }, - SwaggerSchemaProps: (spec.SwaggerSchemaProps) { - Discriminator: (string) "", - ReadOnly: (bool) false, - XML: (*spec.XMLObject)(), - ExternalDocs: (*spec.ExternalDocumentation)(), - Example: (interface {}) - }, - ExtraProps: (map[string]interface {}) - } - }, + Properties: (spec.SchemaProperties) , AdditionalProperties: (*spec.SchemaOrBool)(), Test: TestRelativeBaseURI --- FAIL: TestResolveRemoteRef_RootSame (0.00s) expander_test.go:1252: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1252 Error: Received unexpected error: Get "http://127.0.0.1:45827/refed.json": dial tcp 127.0.0.1:45827: connect: network is unreachable Test: TestResolveRemoteRef_RootSame --- FAIL: TestResolveRemoteRef_FromFragment (0.02s) expander_test.go:1280: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1280 Error: Received unexpected error: Get "http://127.0.0.1:46815/refed.json": dial tcp 127.0.0.1:46815: connect: network is unreachable Test: TestResolveRemoteRef_FromFragment --- FAIL: TestResolveRemoteRef_WithResolutionContext (0.00s) expander_test.go:1313: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1313 Error: Received unexpected error: Get "http://127.0.0.1:39089/resolution.json": dial tcp 127.0.0.1:39089: connect: network is unreachable Test: TestResolveRemoteRef_WithResolutionContext expander_test.go:1314: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1314 Error: Not equal: expected: spec.StringOrArray{"boolean"} actual : spec.StringOrArray(nil) Diff: --- Expected +++ Actual @@ -1,4 +1,2 @@ -(spec.StringOrArray) (len=1) { - (string) (len=7) "boolean" -} +(spec.StringOrArray) Test: TestResolveRemoteRef_WithResolutionContext --- FAIL: TestResolveRemoteRef_WithNestedResolutionContext (0.00s) expander_test.go:1328: Error Trace: /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1328 Error: Received unexpected error: Get "http://127.0.0.1:41263/resolution.json": dial tcp 127.0.0.1:41263: connect: network is unreachable Test: TestResolveRemoteRef_WithNestedResolutionContext panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xaaaadc0d6d50] goroutine 88 [running]: testing.tRunner.func1.2({0xaaaadc30ce00, 0xaaaadc633b00}) /usr/lib/golang/src/testing/testing.go:1734 +0x1ac testing.tRunner.func1() /usr/lib/golang/src/testing/testing.go:1737 +0x334 panic({0xaaaadc30ce00?, 0xaaaadc633b00?}) /usr/lib/golang/src/runtime/panic.go:792 +0x124 github.com/go-openapi/spec.TestResolveRemoteRef_WithNestedResolutionContext(0x4000583880) /home/iurt/rpmbuild/BUILD/golang-github-openapi-spec-0.20.0-build/spec-0.20.0/_build/src/github.com/go-openapi/spec/expander_test.go:1329 +0x190 testing.tRunner(0x4000583880, 0xaaaadc3878e0) /usr/lib/golang/src/testing/testing.go:1792 +0xe4 created by testing.(*T).Run in goroutine 1 /usr/lib/golang/src/testing/testing.go:1851 +0x374 exit status 2 FAIL github.com/go-openapi/spec 1.647s error: Bad exit status from /home/iurt/rpmbuild/tmp/rpm-tmp.wmixgM (%check) RPM build errors: Bad exit status from /home/iurt/rpmbuild/tmp/rpm-tmp.wmixgM (%check) I: [iurt_root_command] ERROR: chroot