Skip to content

Commit

Permalink
json schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti committed Dec 3, 2024
1 parent 177961e commit 0949481
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 0 deletions.
77 changes: 77 additions & 0 deletions docs/json_schemas/grafana_datasource_exchange/v0/provider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"$defs": {
"BaseModel": {
"properties": {},
"title": "BaseModel",
"type": "object"
},
"GrafanaDatasource": {
"properties": {
"type": {
"description": "Type of the datasource.",
"examples": [
"tempo",
"loki",
"prometheus"
],
"title": "Type",
"type": "string"
},
"uid": {
"description": "Grafana datasource UID, as assigned by Grafana.",
"title": "Uid",
"type": "string"
}
},
"required": [
"type",
"uid"
],
"title": "GrafanaDatasource",
"type": "object"
},
"GrafanaSourceAppData": {
"description": "Application databag model for the requirer side of this interface.",
"properties": {
"datasources": {
"contentMediaType": "application/json",
"contentSchema": {
"items": {
"$ref": "#/$defs/GrafanaDatasource"
},
"type": "array"
},
"title": "Datasources",
"type": "string"
}
},
"required": [
"datasources"
],
"title": "GrafanaSourceAppData",
"type": "object"
}
},
"description": "The schemas for the requirer side of this interface.",
"properties": {
"unit": {
"anyOf": [
{
"$ref": "#/$defs/BaseModel"
},
{
"type": "null"
}
],
"default": null
},
"app": {
"$ref": "#/$defs/GrafanaSourceAppData"
}
},
"required": [
"app"
],
"title": "ProviderSchema",
"type": "object"
}
77 changes: 77 additions & 0 deletions docs/json_schemas/grafana_datasource_exchange/v0/requirer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"$defs": {
"BaseModel": {
"properties": {},
"title": "BaseModel",
"type": "object"
},
"GrafanaDatasource": {
"properties": {
"type": {
"description": "Type of the datasource.",
"examples": [
"tempo",
"loki",
"prometheus"
],
"title": "Type",
"type": "string"
},
"uid": {
"description": "Grafana datasource UID, as assigned by Grafana.",
"title": "Uid",
"type": "string"
}
},
"required": [
"type",
"uid"
],
"title": "GrafanaDatasource",
"type": "object"
},
"GrafanaSourceAppData": {
"description": "Application databag model for the requirer side of this interface.",
"properties": {
"datasources": {
"contentMediaType": "application/json",
"contentSchema": {
"items": {
"$ref": "#/$defs/GrafanaDatasource"
},
"type": "array"
},
"title": "Datasources",
"type": "string"
}
},
"required": [
"datasources"
],
"title": "GrafanaSourceAppData",
"type": "object"
}
},
"description": "The schemas for the provider side of this interface.",
"properties": {
"unit": {
"anyOf": [
{
"$ref": "#/$defs/BaseModel"
},
{
"type": "null"
}
],
"default": null
},
"app": {
"$ref": "#/$defs/GrafanaSourceAppData"
}
},
"required": [
"app"
],
"title": "RequirerSchema",
"type": "object"
}

0 comments on commit 0949481

Please sign in to comment.