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

Support openapi extensions in proper resources #299

Closed
sergicastro opened this issue Feb 22, 2021 · 4 comments · Fixed by #302
Closed

Support openapi extensions in proper resources #299

sergicastro opened this issue Feb 22, 2021 · 4 comments · Fixed by #302

Comments

@sergicastro
Copy link
Contributor

Even openapi extensions specific documentation enumerates a list of allowed places where extensions can be used, there are more resources that can support them, for example, Servers as its specific documentation shows.

Current kin-openapi version 0.39.0 supports extensions in the resources described in openapi extensions doc.

But would be useful to expand extensions to the rest of the resources that support them.

Note: This applies to v2.0 and v3.0 specs.

@fenollp
Copy link
Collaborator

fenollp commented Feb 22, 2021

Could you be more specific?
Did you notice https://pkg.go.dev/github.com/getkin/[email protected]/openapi3#ExtensionProps
What do you feel is missing, exactly (an example?)?

@sergicastro
Copy link
Contributor Author

Sure, I notice it, I used it in paths and I expect to be able to use it in servers, since openapi doc says servers support extensions:
image

Currently, I can call path.Extensions but not server.Extensions.

@sergicastro
Copy link
Contributor Author

I guess, support extensions in the missing resources just requires the structs to extend ExtensionsProps, right?
I could take I look.

@sergicastro
Copy link
Contributor Author

@fenollp thanks for your quick work. I added extensions to a few missing resources.

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 a pull request may close this issue.

2 participants