chrusty / protoc-gen-jsonschema

Protobuf to JSON-Schema compiler
Apache License 2.0
496 stars 101 forks source link

Add vendor extensions support for fields. #190

Open pryg-skok opened 5 months ago

pryg-skok commented 5 months ago

This PR adds support for "vendor extensions" option on a field level. This allows to specify some additional metadata that can be passed to generated json-schemas. Especially, this is a powerful feature in case generated json-schemas referenced in OpenAPI specification which is used to generate client / server with openapi-generator. In this case we can easily add support, for example, of validation rules by adding such vendor extension to any field: https://github.com/OpenAPITools/openapi-generator/issues/1145

@chrusty please review