From 74f0066ce364334c63947a4e93e2fefa83c11d28 Mon Sep 17 00:00:00 2001 From: OHTAKE Tomohiro Date: Mon, 17 Feb 2020 05:05:39 +0900 Subject: [PATCH] fix openapi examples (#425) Fix examples to follow breaking changes in go-openapi/spec#113 --- examples/restful-openapi.go | 14 +++++++++----- examples/restful-user-resource.go | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/examples/restful-openapi.go b/examples/restful-openapi.go index b89e5e9b..f22211ec 100644 --- a/examples/restful-openapi.go +++ b/examples/restful-openapi.go @@ -154,13 +154,17 @@ func enrichSwaggerObject(swo *spec.Swagger) { Title: "UserService", Description: "Resource for managing Users", Contact: &spec.ContactInfo{ - Name: "john", - Email: "john@doe.rp", - URL: "http://johndoe.org", + ContactInfoProps: spec.ContactInfoProps{ + Name: "john", + Email: "john@doe.rp", + URL: "http://johndoe.org", + }, }, License: &spec.License{ - Name: "MIT", - URL: "http://mit.org", + LicenseProps: spec.LicenseProps{ + Name: "MIT", + URL: "http://mit.org", + }, }, Version: "1.0.0", }, diff --git a/examples/restful-user-resource.go b/examples/restful-user-resource.go index f8d8c4c6..4d1830d5 100644 --- a/examples/restful-user-resource.go +++ b/examples/restful-user-resource.go @@ -145,13 +145,17 @@ func enrichSwaggerObject(swo *spec.Swagger) { Title: "UserService", Description: "Resource for managing Users", Contact: &spec.ContactInfo{ - Name: "john", - Email: "john@doe.rp", - URL: "http://johndoe.org", + ContactInfoProps: spec.ContactInfoProps{ + Name: "john", + Email: "john@doe.rp", + URL: "http://johndoe.org", + }, }, License: &spec.License{ - Name: "MIT", - URL: "http://mit.org", + LicenseProps: spec.LicenseProps{ + Name: "MIT", + URL: "http://mit.org", + }, }, Version: "1.0.0", },