Skip to content

Commit

Permalink
update schema for alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
weikanglim committed Nov 11, 2024
1 parent 58b7124 commit 1069b95
Showing 1 changed file with 139 additions and 5 deletions.
144 changes: 139 additions & 5 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 @@ -702,11 +740,6 @@
"items": {
"type": "string"
}
},
"remoteBuild": {
"type": "boolean",
"title": "Optional. Whether to build the image remotely",
"description": "If set to true, the image will be built remotely using the Azure Container Registry remote build feature. If set to false, the image will be built locally using Docker."
}
}
},
Expand Down Expand Up @@ -1159,6 +1192,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."
}
}
}
}
}
}
}

0 comments on commit 1069b95

Please sign in to comment.