google / google/gnostic

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

Open
#436 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.3k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.