Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compose: update schema for alpha #4539

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions schemas/alpha/azure.yaml.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,44 @@
]
}
},
"resources": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"title": "Type of resource",
"description": "The type of resource to be created. (Example: db.postgres)",
"enum": [
"db.postgres",
"db.redis",
"db.mongo",
"ai.openai.model",
"host.containerapp"
]
},
"uses": {
"type": "array",
"title": "Other resources that this resource uses",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"allOf": [
{ "if": { "properties": { "type": { "const": "host.containerapp" }}}, "then": { "$ref": "#/definitions/containerAppResource" } },
{ "if": { "properties": { "type": { "const": "ai.openai.model" }}}, "then": { "$ref": "#/definitions/aiModelResource" } },
{ "if": { "properties": { "type": { "const": "db.postgres" }}}, "then": { "$ref": "#/definitions/resource"} },
{ "if": { "properties": { "type": { "const": "db.redis" }}}, "then": { "$ref": "#/definitions/resource"} },
{ "if": { "properties": { "type": { "const": "db.mongo" }}}, "then": { "$ref": "#/definitions/resource"} }
]
}
},
"pipeline": {
"type": "object",
"title": "Definition of continuous integration pipeline",
Expand Down Expand Up @@ -1159,6 +1197,107 @@
}
}
}
},
"resource": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"title": "Type of resource",
"description": "The type of resource to be created. (Example: db.postgres)",
"enum": [
"db.postgres",
"db.redis",
"db.mongo",
"host.containerapp",
"ai.openai.model"
]
},
"uses": {
"type": "array",
"title": "Other resources that this resource uses",
"items": {
"type": "string"
},
"uniqueItems": true
}
}
},
"containerAppResource": {
"type": "object",
"description": "A Docker-based container app.",
"additionalProperties": false,
"required": [
"port"
],
"properties": {
"type": true,
"uses": true,
"port": {
"type": "integer",
"title": "Port that the container app listens on",
"description": "Optional. The port that the container app listens on. (Default: 80)"
},
"env": {
"type": "array",
"title": "Environment variables to set for the container app",
"items": {
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Name of the environment variable"
},
"value": {
"type": "string",
"title": "Value of the environment variable. Supports environment variable substitution."
},
"secret": {
"type": "string",
"title": "Secret value of the environment variable. Supports environment variable substitution."
}
}
}
}
}
},
"aiModelResource": {
"type": "object",
"description": "A deployed, ready-to-use AI model.",
"additionalProperties": false,
"required": [
"model"
],
"properties": {
"type": true,
"uses": true,
"model": {
"type": "object",
"description": "The underlying AI model.",
"additionalProperties": false,
"required": [
"name",
"version"
],
"properties": {
"name": {
"type": "string",
"title": "The name of the AI model.",
"description": "Required. The name of the AI model."
},
"version": {
"type": "string",
"title": "The version of the AI model.",
"description": "Required. The version of the AI model."
}
}
}
}
}
}
}