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

[protoc-gen-openapi] Path Variable and Request Parameters can not pick field options from message body properties #436

Open
ulysses-code opened this issue Mar 25, 2024 · 0 comments

Comments

@ulysses-code
Copy link

ulysses-code commented Mar 25, 2024

Hello,

Currently while generating openapi v3 yaml specification:
For path-variables and request-parameters, there is no handling for field schema properties

If one wants to add more control on path variable, (such as regex pattern), the property(openapi.v3.property option) will be ignored. (just create the plain schema), the problem is it might not meet standard owasp criteria as a openapi v3 document.

code:

fieldSchema = g.reflect.schemaOrReferenceForField(field.Desc)

Should the expected behavior be like how message body handling it? - that besides above, also finding the customized property then merge with current schema

extProperty := proto.GetExtension(field.Desc.Options(), v3.E_Property)

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

No branches or pull requests

1 participant