gnostic icon indicating copy to clipboard operation
gnostic copied to clipboard

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

Open ulysses-code opened this issue 1 year ago • 0 comments

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: https://github.com/google/gnostic/blob/ad271d568b713ad381ad6751cd8b950eade78d98/cmd/protoc-gen-openapi/generator/generator.go#L470

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

https://github.com/google/gnostic/blob/ad271d568b713ad381ad6751cd8b950eade78d98/cmd/protoc-gen-openapi/generator/generator.go#L870

ulysses-code avatar Mar 25 '24 18:03 ulysses-code