Register custom message as schema rather than reference
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.
It sounds like you might be looking for the ability to alias your type, perhaps with a plugin option or some other annotation that says that your timestamp class should be treated as google.protobuf.Timestamp.
It sounds like you might be looking for the ability to alias your type, perhaps with a plugin option or some other annotation that says that your timestamp class should be treated as
google.protobuf.Timestamp.
Yes that would be an awesome feature. Although I must say that I did solve the problem slightly different now, so the need for that is not that pressing anymore.