Skip to content

Commit

Permalink
Add JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
theoctober19th committed Jan 20, 2025
1 parent 23a7304 commit fb53d21
Show file tree
Hide file tree
Showing 2 changed files with 174 additions and 0 deletions.
109 changes: 109 additions & 0 deletions docs/json_schemas/azure_storage/v0/provider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"$defs": {
"AzureStorageProviderAppData": {
"properties": {
"container": {
"description": "The name of the Azure storage container provided by the provider.",
"examples": [
"mycontainer"
],
"title": "Container",
"type": "string"
},
"storage_account": {
"description": "The name of Azure storage account.",
"examples": [
"test-storage-account"
],
"title": "Storage account",
"type": "string"
},
"connection_protocol": {
"$ref": "#/$defs/ConnectionProtocolEnum",
"default": "abfss",
"description": "The connection protocol to be used to connect to Azure Storage.",
"examples": [
"wasb",
"wasbs",
"abfs",
"abfss"
],
"title": "Connection protocol"
},
"secret_key": {
"description": "Secret key corresponding to the storage account for connecting to the object storage.",
"examples": [
"random-secret-key"
],
"format": "password",
"title": "Secret key",
"type": "string",
"writeOnly": true
},
"path": {
"description": "The path inside the container to store objects.",
"examples": [
"foo/bar"
],
"format": "path",
"title": "Path",
"type": "string"
},
"endpoint": {
"description": "The endpoint corresponding to the specific container and storage account.",
"examples": [
"abfss://[email protected]/"
],
"title": "Endpoint URL",
"type": "string"
}
},
"required": [
"container",
"storage_account",
"secret_key",
"path",
"endpoint"
],
"title": "AzureStorageProviderAppData",
"type": "object"
},
"BaseModel": {
"properties": {},
"title": "BaseModel",
"type": "object"
},
"ConnectionProtocolEnum": {
"enum": [
"wasb",
"wasbs",
"abfs",
"abfss"
],
"title": "ConnectionProtocolEnum",
"type": "string"
}
},
"description": "The schema for the provider side of this interface.",
"properties": {
"unit": {
"anyOf": [
{
"$ref": "#/$defs/BaseModel"
},
{
"type": "null"
}
],
"default": null
},
"app": {
"$ref": "#/$defs/AzureStorageProviderAppData"
}
},
"required": [
"app"
],
"title": "ProviderSchema",
"type": "object"
}
65 changes: 65 additions & 0 deletions docs/json_schemas/azure_storage/v0/requirer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"$defs": {
"AzureStorageRequirerAppData": {
"properties": {
"container": {
"description": "The name of the container that's requested by the requirer.",
"examples": [
"mycontainer"
],
"title": "container",
"type": "string"
},
"requested-secrets": {
"description": "Any provider field which should be transfered as Juju Secret",
"examples": [
[
"username",
"password",
"tls-ca",
"uris"
]
],
"items": {
"type": "string"
},
"title": "Requested secrets",
"type": "array"
}
},
"required": [
"container",
"requested-secrets"
],
"title": "AzureStorageRequirerAppData",
"type": "object"
},
"BaseModel": {
"properties": {},
"title": "BaseModel",
"type": "object"
}
},
"description": "The schema for the requirer side of this interface.",
"properties": {
"unit": {
"anyOf": [
{
"$ref": "#/$defs/BaseModel"
},
{
"type": "null"
}
],
"default": null
},
"app": {
"$ref": "#/$defs/AzureStorageRequirerAppData"
}
},
"required": [
"app"
],
"title": "RequirerSchema",
"type": "object"
}

0 comments on commit fb53d21

Please sign in to comment.