You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stack trace:
Error: illegal value '[' (marketplace/public/types/v1/basic_types.proto, line 17)
at illegal (/usr/local/lib/node_modules/protobufjs/src/parse.js:94:16)
at readValue (/usr/local/lib/node_modules/protobufjs/src/parse.js:133:19)
at parseOptionValue (/usr/local/lib/node_modules/protobufjs/src/parse.js:568:63)
at parseOptionValue (/usr/local/lib/node_modules/protobufjs/src/parse.js:566:25)
at parseOption (/usr/local/lib/node_modules/protobufjs/src/parse.js:551:9)
at parseCommon (/usr/local/lib/node_modules/protobufjs/src/parse.js:254:17)
at parseType_block (/usr/local/lib/node_modules/protobufjs/src/parse.js:305:17)
at ifBlock (/usr/local/lib/node_modules/protobufjs/src/parse.js:286:17)
at parseType (/usr/local/lib/node_modules/protobufjs/src/parse.js:304:9)
at parseCommon (/usr/local/lib/node_modules/protobufjs/src/parse.js:259:17)
// A point in the world, expressed as a {latitude, longitude) pair.
message Point {
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_schema) = {
json_schema: {
title: "Point"
description: "Represents a point in the world, expressed as a {latitude, longitude) pair."
required: ["lat", "lng"]
};
};
// Latitude. Values range from -180 to 180.
double lat = 1;
// Longitude. Values range from -90 to 90.
double lng = 2;
}
The text was updated successfully, but these errors were encountered:
This is solved in #1256, which unfortunately hasn't been merged yet. You would need to do a slight change to the option syntax, though: json_schema: { title: "Point" description: "Represents a point in the world, expressed as a {latitude, longitude) pair." required: "lat" required: "lng" };
protobuf.js version: 6.8.8
pbjs failed to compile and produce the js file for proto with inner "["
pbjs commands + params:
pbjs -t static-module --keep-case -w commonjs -p . path/to/proto/xxx.proto > xxx.js
Stack trace:
Error: illegal value '[' (marketplace/public/types/v1/basic_types.proto, line 17)
at illegal (/usr/local/lib/node_modules/protobufjs/src/parse.js:94:16)
at readValue (/usr/local/lib/node_modules/protobufjs/src/parse.js:133:19)
at parseOptionValue (/usr/local/lib/node_modules/protobufjs/src/parse.js:568:63)
at parseOptionValue (/usr/local/lib/node_modules/protobufjs/src/parse.js:566:25)
at parseOption (/usr/local/lib/node_modules/protobufjs/src/parse.js:551:9)
at parseCommon (/usr/local/lib/node_modules/protobufjs/src/parse.js:254:17)
at parseType_block (/usr/local/lib/node_modules/protobufjs/src/parse.js:305:17)
at ifBlock (/usr/local/lib/node_modules/protobufjs/src/parse.js:286:17)
at parseType (/usr/local/lib/node_modules/protobufjs/src/parse.js:304:9)
at parseCommon (/usr/local/lib/node_modules/protobufjs/src/parse.js:259:17)
My proto looks like that:
syntax = "proto3";
package marketplace.types.v1;
option go_package = "gerrit.it.here.com/mobility/marketplace/proto.git/gen/go/marketplace/public/types/v1";
option objc_class_prefix = "MarketplaceTypesV1";
option java_multiple_files = true;
option java_package = "com.here.mobility.marketplace.types.v1";
import "protoc-gen-swagger/options/annotations.proto";
// A point in the world, expressed as a {latitude, longitude) pair.
message Point {
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_schema) = {
json_schema: {
title: "Point"
description: "Represents a point in the world, expressed as a {latitude, longitude) pair."
required: ["lat", "lng"]
};
};
}
The text was updated successfully, but these errors were encountered: