{ "$schema": "http://json-schema.org/draft-07/schema", "$ref": "#/$defs/DefinitionFile", "$defs": { "DefinitionFile": { "title": "Nexus RPC Definition Schema", "description": "Definition for Nexus RPC services and operations", "type": "object", "required": [ "nexusrpc" ], "additionalProperties": false, "properties": { "nexusrpc": { "type": "string", "pattern": "^1\\.\\d+\\.\\d+$" }, "services": { "type": "object", "additionalProperties": { "$ref": "#/$defs/Service" } }, "types": { "type": "object", "additionalProperties": { "$ref": "#/$defs/DataType" } } } }, "Service": { "type": "object", "required": [ "operations" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "operations": { "type": "object", "additionalProperties": { "$ref": "#/$defs/Operation" } } } }, "Operation": { "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string" }, "input": { "$ref": "#/$defs/DataType" }, "output": { "$ref": "#/$defs/DataType" } } }, "DataType": { "allOf": [ { "$ref": "http://json-schema.org/draft-07/schema" }, { "type": "object", "properties": { "$csharpRef": { "type": "string", "description": ".NET type name, fully qualified unless in the same namespace as the service.\n" }, "$goRef": { "type": "string", "description": "Go type name, fully qualified unless in the same package as the service. For example, \"github.com/my-org/my-repo/my-package.MyType\".\n" }, "$javaRef": { "type": "string", "description": "Java type name, fully qualified unless in the same package as the service.\n" }, "$pythonRef": { "type": "string", "description": "Fully qualified Python type name.\n" }, "$typescriptRef": { "type": "string", "description": "TypeScript type name. Can be prepended with the import + \"#\" to fully qualify it and have the \"import type\" emitted. For example, \"MyType\" would be no import, but \"node:url#URL\" would import that from \"node:url\". Similarly, it may be local and suffixed with a file extension, e.g. \"./my-types.js#MyType\". There is currently no way to represent an \"import * from\".\n" } } } ] } } }