devongovett / protobuf-jsonschema

Compiles Protobuf IDL to JSON Schema
119 stars 37 forks source link

Allow importing definitions from anywhere #2

Closed tdb-alcorn closed 2 years ago

tdb-alcorn commented 6 years ago

You can now specify an option to search any location for imports. This is useful if your .proto definitions use any third party types e.g. google/protobuf/timestamp.proto.

The -I, --import option can be specified multiple times: paths are searched in the order they are specified. The search logic looks for definitions both with and without the prefix namespace. For example, an import directive for google/protobuf/timestamp.proto would search for both google/protobuf/timestamp.proto and just timestamp.proto in all the paths specified.

ebclark2 commented 6 years ago

This sounds really useful....

kheyse-oqton commented 6 years ago

This seems sort of essential.

stevengpwc commented 5 years ago

@devongovett This PR is really useful. Could you merge and publish it?

sethtomy commented 4 years ago

+1 on this. This would be incredibly useful.