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

Fix various issues uncovered with the Kubernetes Swagger API #59

Closed optimality closed 6 years ago

optimality commented 6 years ago

1) Handles definitions without a type by treating them as "object". 2) Cleans up some type and name instances 3) Omits top-level definitions that are just a reference.

I'm not sure if this is how you would like to resolve these issues, let me know.

Note that this code still doesn't handle the Kubernetes API appropriately; some models don't appear to be getting defined, and it can't handle maps of arrays.

jprobinson commented 6 years ago

This is lovely, thanks a ton @optimality! I think the updates to to add clean characters throughout alone is worth pulling in.

Also, I'll try and remember to make a caveat note about maps of arrays in the future.