Files
cc-metric-store/internal/config/metricSchema.go
Jan Eitzinger 28f5ffe9c4 Adapt metricConfigSchema to match metricConfigJSON struct
Schema now validates a map of metric names to objects with frequency
(integer) and aggregation (string) fields.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:53:34 +01:00

27 lines
724 B
Go

// Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
// All rights reserved. This file is part of cc-metric-store.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package config
var metricConfigSchema = `
{
"type": "object",
"description": "Map of metric names to their configuration.",
"additionalProperties": {
"type": "object",
"properties": {
"frequency": {
"description": "Sampling frequency in seconds.",
"type": "integer"
},
"aggregation": {
"description": "Aggregation strategy: 'sum', 'avg', or 'null'.",
"type": "string"
}
},
"required": ["frequency", "aggregation"]
}
}`