protoc-gen-jsonschema
protoc-gen-jsonschema copied to clipboard
Cannot convert proto
I'm trying to convert this proto file but I get the error:
INFO[0000] Generating JSON-schema for MESSAGE jsonschema_filename=StringAttribute.schema.json msg_name=StringAttribute proto_filename=collectionset.proto
INFO[0000] Generating JSON-schema for MESSAGE jsonschema_filename=NumericAttribute.schema.json msg_name=NumericAttribute proto_filename=collectionset.proto
INFO[0000] Generating JSON-schema for MESSAGE jsonschema_filename=NodeLevelResource.schema.json msg_name=NodeLevelResource proto_filename=collectionset.proto
ERRO[0000] Failed to convert error="no such message type named .NodeLevelResource" proto_filename=collectionset.proto
WARN[0000] Failed to process code generator but successfully sent the error to protoc
--jsonschema_out: protoc-gen-jsonschema: Plugin failed with status code 1.
protoc --version
libprotoc 23.3
Hi @jack-burridge-cfh, this is a strange one. I'm guessing it's related to that file not specifying a package name, which makes tracking messages difficult. Is that a file you control?
@chrusty sadly it is not
I can confirm I got this error when I hadn't specified a package name. It worked when I specified one.