Skip to content

Commit

Permalink
add metadata to json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
NouhaManai96 committed Dec 11, 2024
1 parent 6b70b84 commit 4907037
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type ProfileDefinition struct {
Description string `yaml:"description,omitempty" json:"description,omitempty"`
SysObjectIDs StringArray `yaml:"sysobjectid,omitempty" json:"sysobjectid,omitempty"`
Extends []string `yaml:"extends,omitempty" json:"extends,omitempty"`
Metadata MetadataConfig `yaml:"metadata,omitempty" json:"metadata,omitempty" jsonschema:"-"`
Metadata MetadataConfig `yaml:"metadata,omitempty" json:"metadata,omitempty"`
MetricTags []MetricTagConfig `yaml:"metric_tags,omitempty" json:"metric_tags,omitempty"`
StaticTags []string `yaml:"static_tags,omitempty" json:"static_tags,omitempty"`
Metrics []MetricsConfig `yaml:"metrics,omitempty" json:"metrics,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,48 @@
},
"type": "array"
},
"MetadataConfig": {
"additionalProperties": {
"$ref": "#/$defs/MetadataResourceConfig"
},
"type": "object"
},
"MetadataField": {
"properties": {
"symbol": {
"$ref": "#/$defs/SymbolConfig"
},
"symbols": {
"items": {
"$ref": "#/$defs/SymbolConfig"
},
"type": "array"
},
"value": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"MetadataResourceConfig": {
"properties": {
"fields": {
"additionalProperties": {
"$ref": "#/$defs/MetadataField"
},
"type": "object"
},
"id_tags": {
"$ref": "#/$defs/MetricTagConfigList"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"fields"
]
},
"MetricIndexTransform": {
"properties": {
"start": {
Expand Down Expand Up @@ -136,6 +178,9 @@
},
"type": "array"
},
"metadata": {
"$ref": "#/$defs/MetadataConfig"
},
"metric_tags": {
"items": {
"$ref": "#/$defs/MetricTagConfig"
Expand Down

0 comments on commit 4907037

Please sign in to comment.