Skip to content

Commit

Permalink
Replace SemConvVersion with a string
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Sep 21, 2023
1 parent d479e47 commit af5abaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion schema/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestParseSchemaFile(t *testing.T) {
t, &Schema{
FileFormat: "1.1.0",
SchemaURL: "https://opentelemetry.io/schemas/1.1.0",
Versions: map[SemConvVersion]Changeset{
Versions: map[string]Changeset{
"1.0.0": {},

"1.1.0": {
Expand Down
13 changes: 6 additions & 7 deletions schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ type Schema struct {
// [URL]: https://github.com/open-telemetry/opentelemetry-specification/blob/007f415120090972e22a90afd499640321f160f3/specification/schemas/file_format_v1.1.0.md#schema-url
SchemaURL string `yaml:"schema_url"`

// Versions are the telemetry transforms that apply for each semantic
// convention version.
Versions map[SemConvVersion]Changeset
// Versions is the map from semantic convention version to telemetry
// changeset required by those semantic convetions.
//
// The version string is a semver string matching the release version of
// semantic conventions (e.g. "1.7.0").
Versions map[string]Changeset
}

var (
Expand Down Expand Up @@ -72,10 +75,6 @@ func (s *Schema) validate() error {
return nil
}

// SemConvVersion is a semantic conventions version used by a schema file (e.g.
// "1.7.0").
type SemConvVersion string

// Changeset is all the applicable telemetry changes for a particular semantic
// convention version.
type Changeset struct {
Expand Down

0 comments on commit af5abaf

Please sign in to comment.