-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from trisch-me/embed
- Loading branch information
Showing
19 changed files
with
622 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/weaver_resolver/data/registry-test-10-prefix-refs/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test adding a prefix to the references in attributes. |
63 changes: 63 additions & 0 deletions
63
crates/weaver_resolver/data/registry-test-10-prefix-refs/expected-attribute-catalog.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
[ | ||
{ | ||
"name": "client.id", | ||
"type": "string", | ||
"brief": "some client id\n", | ||
"examples": [ | ||
"a.einstein" | ||
], | ||
"requirement_level": "recommended", | ||
"stability": "experimental" | ||
}, | ||
{ | ||
"name": "geo.lat", | ||
"type": "string", | ||
"brief": "latitude of the geo coordinates.\n", | ||
"examples": [ | ||
"123.456" | ||
], | ||
"requirement_level": "recommended", | ||
"stability": "experimental" | ||
}, | ||
{ | ||
"name": "geo.lon", | ||
"type": "string", | ||
"brief": "longitude of the geo coordinates.\n", | ||
"examples": [ | ||
"234.456" | ||
], | ||
"requirement_level": "recommended", | ||
"stability": "experimental" | ||
}, | ||
{ | ||
"name": "geo.lat", | ||
"type": "string", | ||
"brief": "this is ref attribute", | ||
"examples": [ | ||
"123.456" | ||
], | ||
"requirement_level": "recommended", | ||
"stability": "experimental" | ||
}, | ||
{ | ||
"name": "client.geo.lat", | ||
"type": "string", | ||
"brief": "My own latitude", | ||
"examples": [ | ||
"123.456" | ||
], | ||
"requirement_level": "recommended", | ||
"stability": "experimental", | ||
"prefix": true | ||
}, | ||
{ | ||
"name": "client.geo.lat", | ||
"type": "string", | ||
"brief": "this is embedded attribute", | ||
"examples": [ | ||
"123.456" | ||
], | ||
"requirement_level": "recommended", | ||
"stability": "experimental" | ||
} | ||
] |
106 changes: 106 additions & 0 deletions
106
crates/weaver_resolver/data/registry-test-10-prefix-refs/expected-registry.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"registry_url": "https://127.0.0.1", | ||
"groups": [ | ||
{ | ||
"id": "registry.client", | ||
"type": "attribute_group", | ||
"brief": "Describes information about the client.", | ||
"prefix": "client", | ||
"attributes": [ | ||
0, | ||
4 | ||
], | ||
"lineage": { | ||
"source_file": "data/registry-test-10-prefix-refs/registry/client.yaml", | ||
"attributes": { | ||
"client.geo.lat": { | ||
"source_group": "registry.geo", | ||
"inherited_fields": [ | ||
"examples", | ||
"note", | ||
"requirement_level", | ||
"stability" | ||
], | ||
"locally_overridden_fields": [ | ||
"brief" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "registry.geo", | ||
"type": "attribute_group", | ||
"brief": "Attributes describing geo.", | ||
"prefix": "geo", | ||
"attributes": [ | ||
1, | ||
2 | ||
], | ||
"lineage": { | ||
"source_file": "data/registry-test-10-prefix-refs/registry/geo.yaml" | ||
} | ||
}, | ||
{ | ||
"id": "usage", | ||
"type": "attribute_group", | ||
"brief": "Attributes for test.", | ||
"prefix": "usage", | ||
"attributes": [ | ||
0, | ||
2, | ||
3, | ||
5 | ||
], | ||
"lineage": { | ||
"source_file": "data/registry-test-10-prefix-refs/registry/usage.yaml", | ||
"attributes": { | ||
"client.geo.lat": { | ||
"source_group": "registry.client", | ||
"inherited_fields": [ | ||
"examples", | ||
"note", | ||
"requirement_level", | ||
"stability" | ||
], | ||
"locally_overridden_fields": [ | ||
"brief" | ||
] | ||
}, | ||
"client.id": { | ||
"source_group": "registry.client", | ||
"inherited_fields": [ | ||
"brief", | ||
"examples", | ||
"note", | ||
"requirement_level", | ||
"stability" | ||
] | ||
}, | ||
"geo.lat": { | ||
"source_group": "registry.geo", | ||
"inherited_fields": [ | ||
"examples", | ||
"note", | ||
"requirement_level", | ||
"stability" | ||
], | ||
"locally_overridden_fields": [ | ||
"brief" | ||
] | ||
}, | ||
"geo.lon": { | ||
"source_group": "registry.geo", | ||
"inherited_fields": [ | ||
"brief", | ||
"examples", | ||
"note", | ||
"requirement_level", | ||
"stability" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
crates/weaver_resolver/data/registry-test-10-prefix-refs/registry/client.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
groups: | ||
- id: registry.client | ||
prefix: client | ||
type: attribute_group | ||
brief: "Describes information about the client." | ||
attributes: | ||
- id: id | ||
type: string | ||
stability: experimental | ||
brief: > | ||
some client id | ||
examples: ['a.einstein'] | ||
- ref: geo.lat | ||
prefix: true | ||
brief: My own latitude |
18 changes: 18 additions & 0 deletions
18
crates/weaver_resolver/data/registry-test-10-prefix-refs/registry/geo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
groups: | ||
- id: registry.geo | ||
brief: Attributes describing geo. | ||
type: attribute_group | ||
prefix: geo | ||
attributes: | ||
- id: lat | ||
type: string | ||
stability: experimental | ||
brief: > | ||
latitude of the geo coordinates. | ||
examples: ["123.456"] | ||
- id: lon | ||
type: string | ||
stability: experimental | ||
brief: > | ||
longitude of the geo coordinates. | ||
examples: [ "234.456" ] |
Oops, something went wrong.