gotsrpc/gotsrpc.schema.json
Kevin Franklin Kim b41cebcea3
feat: add schema
2025-09-18 23:20:12 +02:00

103 lines
2.1 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/foomo/gotsrpc/v2/config/config",
"$ref": "#/$defs/Config",
"$defs": {
"Config": {
"properties": {
"module": {
"$ref": "#/$defs/Namespace"
},
"targets": {
"additionalProperties": {
"$ref": "#/$defs/Target"
},
"type": "object"
},
"mappings": {
"$ref": "#/$defs/TypeScriptMappings"
}
},
"additionalProperties": false,
"type": "object"
},
"Mapping": {
"properties": {
"out": {
"type": "string"
},
"structs": {
"items": {
"type": "string"
},
"type": "array"
},
"scalars": {
"items": {
"type": "string"
},
"type": "array"
},
"module": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"Namespace": {
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"Target": {
"properties": {
"package": {
"type": "string"
},
"services": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"module": {
"type": "string"
},
"out": {
"type": "string"
},
"gorpc": {
"items": {
"type": "string"
},
"type": "array"
},
"tsrpc": {
"items": {
"type": "string"
},
"type": "array"
},
"skipTSRPCClient": {
"type": "boolean"
}
},
"additionalProperties": false,
"type": "object"
},
"TypeScriptMappings": {
"additionalProperties": {
"$ref": "#/$defs/Mapping"
},
"type": "object"
}
}
}