Skip to content

Commit

Permalink
feat: added Matcher to TargetEnrichmentRule -> Attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ReuDa committed Feb 23, 2023
1 parent 5f2cc40 commit cd6cad8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
13 changes: 12 additions & 1 deletion go/discovery_kit_api/discovery_kit_api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions go/discovery_kit_api/discovery_kit_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ func TestTargetDescription(t *testing.T) {
Attributes: []Attribute{
{
AggregationType: Any,
Matcher: Equals,
Name: "container.name",
},
{
AggregationType: All,
Matcher: Equals,
Name: "container.name",
},
},
Expand Down
7 changes: 7 additions & 0 deletions openapi/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,20 @@ components:
properties:
name:
type: string
matcher:
type: string
enum:
- equals
- contains
- starts_with
aggregationType:
type: string
enum:
- any
- all
required:
- name
- matcher
- aggregationType
SourceOrDestination:
type: object
Expand Down
2 changes: 2 additions & 0 deletions typescript/discovery_kit_api/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ export const targetDescription: TargetDescription = {
attributes: [
{
aggregationType: "all",
matcher:"equals",
name: 'container.name'
},
{
aggregationType: "any",
matcher:"equals",
name: 'container.name'
}
]
Expand Down
2 changes: 2 additions & 0 deletions typescript/discovery_kit_api/schemas.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export interface components {
Attribute: {
name: string;
/** @enum {string} */
matcher: 'equals' | 'contains' | 'starts_with';
/** @enum {string} */
aggregationType: 'any' | 'all';
};
SourceOrDestination: {
Expand Down

0 comments on commit cd6cad8

Please sign in to comment.