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

feat(extensions): adds vendor extensions to all entities #477

Merged
merged 3 commits into from Sep 17, 2021

Conversation

erraggy
Copy link
Contributor

@erraggy erraggy commented Sep 13, 2021

Swagger provides vendor extensions that allow custom properties to be added to any of the swagger entities (params, operations, responses, etc...). This adds a new companion type: restful.ExtensionProps that provides a map[string]interface{} to store extension values by their string key and the AddExtension(key string, value interface{}) method to store values.

Since swagger is handled by the go-restful-openapi module, the changes here are required in its own pull request: emicklei/go-restful-openapi#71

For more details on swagger extensions, please see: https://swagger.io/docs/specification/2-0/swagger-extensions/

Swagger provides vendor extensions that allow custom properties to be added to any of the swagger entities (params, operations, responses, etc...)

Has interdependent changes with go-restful-openapi as well.

See: https://swagger.io/docs/specification/2-0/swagger-extensions/
go.mod Outdated Show resolved Hide resolved
@emicklei
Copy link
Owner

Thank you for contributing the making this last change. One last preference is to not use an abbreviation for ExtensionProperties. As you can see in the package, no other type name is shortened.

@erraggy
Copy link
Contributor Author

erraggy commented Sep 15, 2021

Thank you for contributing the making this last change. One last preference is to not use an abbreviation for ExtensionProperties. As you can see in the package, no other type name is shortened.

Changes applied. Thanks for the prompt reviews 👍🏻

@emicklei emicklei merged commit 55d4a98 into emicklei:v3 Sep 17, 2021
@erraggy erraggy deleted the vendor-extensions branch September 23, 2021 04:06
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.

None yet

2 participants