Register custom message as schema rather than reference
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
It seems that for "well known" types, such as `google.protobuf.Timestamp`, the generated OpenAPI 3.0 document contains a inline schema (format date-time) instead of a reference, which is a nice feature.
I was wondering, if the same is possible for custom defined messages? Background: We are using our own `Timestamp` implementation (which is basically a wrapper around `google.protobuf.Timestamp`) because we need to implement `sql.Valuer` and `sql.Scanner` on it. When I use it, it always gets generated as a separate schema with a reference, in which clients think that the field contains an object, whereas it only should contain a `date-time` formatted strings.
Seems somehow related to #351, although #351 refers to another "well-known" type.
Contributor guide
Assessment
This issue has not been assessed yet.