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

Correct the indentations in schema json #4

Merged
merged 1 commit into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
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
164 changes: 83 additions & 81 deletions translator/config/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ var schema = `{
}
},
"minProperties": 1,
"additionalProperties": { "$ref": "#/definitions/metricsDefinition/definitions/basicMetricDefinition"}
"additionalProperties": {
"$ref": "#/definitions/metricsDefinition/definitions/basicMetricDefinition"
}
},
"force_flush_interval": {
"description": "Max time to wait before batch publishing the metrics, unit is second.",
Expand Down Expand Up @@ -312,8 +314,8 @@ var schema = `{
},
"maxItems": 256
},
"drop_device":{
"type":"boolean"
"drop_device": {
"type": "boolean"
}
}
}
Expand Down Expand Up @@ -381,86 +383,86 @@ var schema = `{
"maxItems": 255,
"items": {
"allOf": [
{
"$ref": "#/definitions/metricsDefinition/definitions/basicMetricDefinition"
{
"$ref": "#/definitions/metricsDefinition/definitions/basicMetricDefinition"
},
{
"type": "object",
"properties": {
"pid_file": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"descriptions": "the path of pid_file"
},
"exe": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"descriptions": "a regex matches the names of processes"
},
"pattern": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"descriptions": "a regex matches the whole command of processes"
},
"measurement": {
"$ref": "#/definitions/metricsDefinition/definitions/metricsMeasurementWithoutDecorationDefinition"
}
},
{
"type": "object",
"properties": {
"pid_file": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"descriptions": "the path of pid_file"
},
"exe": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"descriptions": "a regex matches the names of processes"
},
"pattern": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"descriptions": "a regex matches the whole command of processes"
},
"measurement": {
"$ref": "#/definitions/metricsDefinition/definitions/metricsMeasurementWithoutDecorationDefinition"
}
"anyOf": [
{
"required": [
"pid_file"
]
},
{
"required": [
"exe"
]
},
"anyOf": [
{
"required": [
"pid_file"
]
},
{
"required": [
"exe"
]
},
{
"required": [
"pattern"
]
}
]
}
{
"required": [
"pattern"
]
}
]
}
]
}
},
"ethtoolDefinitions": {
"type": "object",
"properties": {
"interface_include": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"interface_exclude": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"metrics_include": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
},
"additionalProperties": false
},
"metricsMeasurementWithoutDecorationDefinition": {
},
"ethtoolDefinitions": {
"type": "object",
"properties": {
"interface_include": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"interface_exclude": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"metrics_include": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
},
"additionalProperties": false
},
"metricsMeasurementWithoutDecorationDefinition": {
"type": "array",
"items": {
"type": "string",
Expand All @@ -469,7 +471,7 @@ var schema = `{
},
"uniqueItems": true
},
"metricsMeasurementDefinition": {
"metricsMeasurementDefinition": {
"type": "array",
"items": {
"oneOf": [
Expand Down Expand Up @@ -631,7 +633,7 @@ var schema = `{
"maxLength": 4096
},
"publish_multi_logs": {
"type": "boolean"
"type": "boolean"
}
},
"required": [
Expand Down
Loading