{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/metatype.json", "title": "Metatype configuration file schema", "additionalProperties": false, "type": "object", "definitions": { "path": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "typegraphLoaderConfig": { "type": "object", "additionalProperties": false, "properties": { "include": { "$ref": "#/definitions/path", "description": "A pattern or array of patterns to include." }, "exclude": { "$ref": "#/definitions/path", "description": "A pattern or array of patterns to exclude." } }, "description": "Configuration for loading typegraph files." }, "generatorConfigBase": { "type": "object", "properties": { "typegraph_name": { "type": "string", "description": "The name of the typegraph." }, "typegraph_path": { "type": "string", "description": "The target typegraph file path." }, "path": { "type": "string", "description": "The directory for the generated files." }, "template_dir": { "type": "string", "description": "The directory containing template files." } } }, "rustGeneratorConfigBase": { "type": "object", "properties": { "skip_cargo_toml": { "type": "boolean", "description": "Whether to skip generating the `Cargo.toml` file." }, "skip_lib_rs": { "type": "boolean", "description": "Whether to skip generating the `lib.rs` file." }, "crate_name": { "type": "string", "description": "Generated crate name." } } }, "clientTsGeneratorConfig": { "type": "object", "properties": { "generator": { "const": "client_ts", "description": "See: ." } } }, "clientPyGeneratorConfig": { "type": "object", "properties": { "generator": { "const": "client_py", "description": "See: ." } } }, "clientRsGeneratorConfig": { "allOf": [ { "type": "object", "properties": { "generator": { "const": "client_rs", "description": "See: ." } } }, { "$ref": "#/definitions/rustGeneratorConfigBase" } ] }, "fdkTsGeneratorConfig": { "type": "object", "properties": { "generator": { "const": "fdk_ts", "description": "See: ." }, "stubbed_runtimes": { "type": "array", "items": { "type": "string" } }, "exclude_client": { "type": "boolean", "description": "Whether to generate metagen client code." } } }, "fdkPyGeneratorConfig": { "type": "object", "properties": { "generator": { "const": "fdk_py", "description": "See: ." }, "exclude_client": { "type": "boolean", "description": "Whether to generate metagen client code." } } }, "fdkRsGeneratorConfig": { "allOf": [ { "type": "object", "properties": { "generator": { "const": "fdk_rs", "description": "See: ." }, "stubbed_runtimes": { "type": "array", "items": { "type": "string" } }, "exclude_client": { "type": "boolean", "description": "Whether to generate metagen client code." } } }, { "$ref": "#/definitions/rustGeneratorConfigBase" } ] }, "fdkSubGeneratorConfig": { "type": "object", "properties": { "generator": { "const": "fdk_substantial" } } }, "generatorConfig": { "allOf": [ { "$ref": "#/definitions/generatorConfigBase" }, { "oneOf": [ { "$ref": "#/definitions/clientTsGeneratorConfig" }, { "$ref": "#/definitions/clientPyGeneratorConfig" }, { "$ref": "#/definitions/clientRsGeneratorConfig" }, { "$ref": "#/definitions/fdkTsGeneratorConfig" }, { "$ref": "#/definitions/fdkPyGeneratorConfig" }, { "$ref": "#/definitions/fdkRsGeneratorConfig" }, { "$ref": "#/definitions/fdkSubGeneratorConfig" } ] } ] } }, "properties": { "typegates": { "type": "object", "description": "Configuration for typegate nodes. See: .", "additionalProperties": { "type": "object", "description": "Individual typegate node configuration.", "additionalProperties": false, "properties": { "url": { "type": "string", "format": "uri", "description": "The base URL of the typegate server, example: ." }, "prefix": { "type": "string", "description": "A prefix for typegraphs." }, "username": { "type": "string", "description": "Administrator username for the typegate." }, "password": { "type": "string", "description": "Administrator password for the typegate." }, "env": { "type": "object", "description": "Environment variables for the typegate.", "additionalProperties": { "type": "string" } }, "secrets": { "type": "object", "description": "Secrets used for configuring runtimes within the typegraphs. See: .", "additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "typegraphs": { "type": "object", "additionalProperties": false, "description": "Typegraph deployment configurations. See: .", "properties": { "python": { "$ref": "#/definitions/typegraphLoaderConfig", "description": "Configuration for Python typegraphs." }, "javascript": { "$ref": "#/definitions/typegraphLoaderConfig", "description": "Configuration for JavaScript typegraphs." }, "typescript": { "$ref": "#/definitions/typegraphLoaderConfig", "description": "Configuration for TypeScript typegraphs." }, "materializers": { "type": "object", "additionalProperties": false, "description": "Materializer configurations for typegraphs.", "properties": { "prisma": { "type": "object", "additionalProperties": false, "description": "Prisma materializer configuration.", "properties": { "migrations_path": { "type": "string", "description": "The directory for storing Prisma migration files." } } } } } } }, "metagen": { "type": "object", "additionalProperties": false, "description": "Metagen configurations. See: .", "properties": { "targets": { "type": "object", "description": "Code generation target configurations.", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/generatorConfig" } } } } } } }