nytimes / openapi2proto

A tool for generating Protobuf v3 schemas and gRPC service definitions from OpenAPI specifications
Apache License 2.0
964 stars 98 forks source link

Support ability to add field options to generated protobuf #134

Open joshua-bell-sonrai opened 3 years ago

joshua-bell-sonrai commented 3 years ago

Reason

It would be nice if the ability to add custom field options.

Example

input

Config:
    type: object
    required:
      - config
    properties:
      config:
        type: string
        fieldOption: [ (graphqlOverride) = { type: "DateTime" } ]

output

message Config {
    string config = 1 [ (graphqlOverride) = { type: "DateTime" } ];
}