94 lines
2.0 KiB
JSON
94 lines
2.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://go-sip.local/contracts/schema/http-ai-providers.schema.json",
|
|
"title": "GET /internal/v1/dispatcher/ai-providers response; external SaaS compatibility unverified",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"resource",
|
|
"dispatcher_id",
|
|
"providers"
|
|
],
|
|
"properties": {
|
|
"resource": {
|
|
"const": "ai_providers"
|
|
},
|
|
"dispatcher_id": {
|
|
"$ref": "./common.schema.json#/$defs/dispatcher_id"
|
|
},
|
|
"providers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/provider"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"$ref": "./common.schema.json#/$defs/error"
|
|
}
|
|
],
|
|
"$defs": {
|
|
"provider": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"provider_id",
|
|
"provider_code",
|
|
"api_key"
|
|
],
|
|
"properties": {
|
|
"provider_id": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"provider_code": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"api_endpoint": {
|
|
"type": "string"
|
|
},
|
|
"ws_endpoint": {
|
|
"type": "string"
|
|
},
|
|
"api_key": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"$comment": "Connection credential; never log its content."
|
|
},
|
|
"extra_config": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"api_endpoint"
|
|
],
|
|
"properties": {
|
|
"api_endpoint": {
|
|
"minLength": 1
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"required": [
|
|
"ws_endpoint"
|
|
],
|
|
"properties": {
|
|
"ws_endpoint": {
|
|
"minLength": 1
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|