Can't compile and produce the js file for proto with inner "["
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 716
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 10
Description
Hi! I have error with compiling .proto having inner "[" char when use custom [mountebank](https://github.com/ozonru/mountebank-grpc/blob/master/src/mock.js#L40):
`error: [2021-11-11T11:36:31.231Z] - [grpc:4542] /app/node_modules/@ozonru/mountebank-grpc/src/mock.js:40
throw new ProtoError(serviceOptions.file, error.message)
^
ProtoError: Could not loading a proto file "my_service.proto". Have you added a path with vendor's proto files to request?
Error message: illegal value '[' (protos/my_service/my_service.proto, line 440)
at /app/node_modules/@ozonru/mountebank-grpc/src/mock.js:40:19
at Array.forEach ()
at Object.getServerInstance (/app/node_modules/@ozonru/mountebank-grpc/src/mock.js:31:37)
at Server. (/app/node_modules/@ozonru/mountebank-grpc/src/index.js:22:41)
at Object.onceWrapper (events.js:420:28)
at Server.emit (events.js:314:20)
at emitCloseNT (net.js:1657:8)
at processTicksAndRejections (internal/process/task_queues.js:83:21)`
In proto on line 440 file we have field:
`int64 some_id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {required: ['some_id']}];`
I assume it may be related to [this](https://github.com/protobufjs/protobuf.js/issues/1289).
Could you help to solve this problem?
Contributor guide
Assessment
This issue has not been assessed yet.