Closed chrusty closed 2 years ago
As mentioned in https://github.com/chrusty/protoc-gen-jsonschema/issues/108#issuecomment-1019875419 I think we should consider the cases where the description is just one line so the title and the description are the same.
Hey, this would solve what we are looking for! Cant wait to use it!
I left another comment about this approach in https://github.com/chrusty/protoc-gen-jsonschema/issues/108#issuecomment-1020535489. Could we please hold this PR until we discuss the approach in the issue?
I left another comment about this approach in #108 (comment). Could we please hold this PR until we discuss the approach in the issue?
Hey @jcchavezs thanks for your investigations. Would you be able to let me know if the PR in its current state could work for your use case (with "detached comments" providing the title)?
In response to an issue raised by @mrozycki-tink, this PR introduces new behaviour which uses the first line of protobuf comments to populate the JSONSchema
title
field (but only if there are more than one comments).In this example the title would be "Thing":
The protobuf library describes this as being a "detached" comment, which to me seems like a good way to pick a title.