Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OpenAPI examples #425

Merged
merged 1 commit into from
Feb 16, 2020
Merged

Conversation

ohtake
Copy link
Contributor

@ohtake ohtake commented Feb 13, 2020

There are breaking changes in go-openapi/spec#113.
This pull request fixes them.

$ cd examples
$ go build restful-openapi.go
# command-line-arguments
.\restful-openapi.go:157:5: cannot use promoted field ContactInfoProps.Name in struct literal of type spec.ContactInfo
.\restful-openapi.go:158:5: cannot use promoted field ContactInfoProps.Email in struct literal of type spec.ContactInfo
.\restful-openapi.go:159:5: cannot use promoted field ContactInfoProps.URL in struct literal of type spec.ContactInfo
.\restful-openapi.go:162:5: cannot use promoted field LicenseProps.Name in struct literal of type spec.License
.\restful-openapi.go:163:5: cannot use promoted field LicenseProps.URL in struct literal of type spec.License

Fix examples to follow breaking changes in go-openapi/spec#113
@emicklei
Copy link
Owner

thank you for contributing. the examples were made in the time we did not have Go modules. I will merge your request but also will introduce Go module support here to at least document what version is expected.

@emicklei emicklei merged commit c34c827 into emicklei:master Feb 16, 2020
emicklei pushed a commit that referenced this pull request Feb 16, 2020
Fix examples to follow breaking changes in go-openapi/spec#113
@ohtake ohtake deleted the fix-openapi-example branch February 17, 2020 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants