{ "$schema": "http://json-schema.org/schema", "$id": "https://github.com/ayonli/ngrpc/blob/main/ngrpc.schema.json", "title": "NgRPC Config", "description": "The configuration for NgRPC", "type": "object", "properties": { "namespace": { "type": "string", "description": "The namespace of the services files, default `services`." }, "tsconfig": { "type": "string", "description": "Custom tsconfig.json file for compiling TypeScript files." }, "importRoot": { "type": "string", "description": "Where to begin searching for TypeScript / JavaScript files, the default is `.`." }, "protoPaths": { "type": "array", "description": "The directories that contains `.proto` files.", "items": { "type": "string" } }, "protoOptions": { "type": "object", "description": "These options are used when loading the `.proto` files.", "properties": { "keepCase": { "type": "boolean", "description": "Preserve field names. The default is to change them to camel case." }, "longs": { "type": "string", "description": "The type to use to represent long values. Defaults to a Long object type.", "enum": [ "String", "Number" ] }, "enums": { "type": "string", "description": "The type to use to represent enum values. Defaults to the numeric value.", "enum": [ "String" ] }, "bytes": { "type": "string", "description": "The type to use to represent bytes values. Defaults to Buffer.", "enum": [ "Array", "String" ] }, "defaults": { "type": "boolean", "description": "Set default values on output objects. Defaults to false." }, "arrays": { "type": "boolean", "description": "Set empty arrays for missing array values even if defaults is false Defaults to false." }, "objects": { "type": "boolean", "description": "Set empty objects for missing object values even if defaults is false Defaults to false." }, "oneofs": { "type": "boolean", "description": "Set virtual oneof properties to the present field's name. Defaults to false." }, "json": { "type": "boolean", "description": "Represent Infinity and NaN as strings in float fields, and automatically decode google.protobuf.Any values. Defaults to false" }, "includeDirs": { "type": "array", "description": "A list of search paths for imported .proto files.", "items": { "type": "string" } } } }, "apps": { "type": "array", "description": "This property configures the apps that this project serves and connects.", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the app." }, "url": { "type": "string", "description": "The URL of the gRPC server, supported schemes are `grpc:`, `grpcs:`, `http:`, `https:` or `xds:`.", "pattern": "^(http|https|grpc|grpcs|xds)://*" }, "serve": { "type": "boolean", "description": "If this app is served by the NgRPC app server.", "default": false }, "services": { "description": "The services served by this app.", "type": "array", "items": { "type": "string" } }, "cert": { "type": "string", "description": "The certificate filename when using TLS/SSL." }, "key": { "type": "string", "description": "The private key filename when using TLS/SSL." }, "ca": { "type": "string", "description": "The CA filename used to verify the other peer's certificates, when omitted, the system's root CAs will be used." }, "connectTimeout": { "type": "integer", "description": "Connection timeout in milliseconds, the default value is `5_000` ms." }, "options": { "type": "object", "description": "Channel options, see https://www.npmjs.com/package/@grpc/grpc-js for more details." }, "stdout": { "type": "string", "description": "Log file used for stdout." }, "stderr": { "type": "string", "description": "Log file used for stderr." }, "entry": { "type": "string", "description": "The entry file used to spawn this app." }, "env": { "type": "object", "description": "Additional environment variables passed to the `entry` file." } }, "required": [ "name", "url", "services" ], "dependencies": { "options": [ "serve" ], "stdout": [ "serve" ], "stderr": [ "serve", "stdout" ], "args": [ "serve" ], "env": [ "serve" ] } } } }, "required": [ "protoPaths", "apps" ] }