Skip to content

Commit

Permalink
Update description and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm committed Oct 24, 2024
1 parent dca0eef commit c4a5290
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions code/go/pkg/validator/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ func TestValidateFile(t *testing.T) {
"found security rule assets in package but security capability is missing",
},
},
"bad_policy_template_behavior": {
"manifest.yml",
[]string{
"field policy_templates_behavior: policy_templates_behavior must be one of the following: \"default\"",
},
},
}

for pkgName, test := range tests {
Expand Down
2 changes: 1 addition & 1 deletion spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- description: Add validation rule to ensure security capability is added if there is any security rule asset.
type: enhancement
link: https://github.com/elastic/package-spec/pull/820
- description: Added new policy_templates_behaviour setting to manage how to show policy tmeplates to the user in Kibana.
- description: Added new policy_templates_behavior setting to manage how to show policy tmeplates to the user in Kibana.
type: enhancement
link: https://github.com/elastic/package-spec/pull/825
- version: 3.3.0
Expand Down
14 changes: 7 additions & 7 deletions spec/integration/manifest.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,17 +364,17 @@ spec:
$ref: "#/definitions/conditions"
# requires a conditional JSON schema to update the value depending
# on the policy_templates length
policy_templates_behaviour:
policy_templates_behavior:
description: >
Behaviour to manage the policy templates (policy_templates field) defined that must be available in Kibana as tiles.
Behavior to manage the policy templates (policy_templates field) defined that must be available in Kibana as tiles.
This is just applicable for those packages that define more than one policy template. By default for these packages, Kibana
shows all the policy templates defined in the manifest separately plus another one refering to the
whole integraton (that contains all the policy templates definitions) available to the user.
shows all the policy templates defined in the manifest separately plus another one referring to the
whole integration (that contains all the policy templates definitions) available to the user.
If the `integration_package_only` option is selected, then just one policy template for the whole integration containing all policy
templates will be available in Kibana. If the `policy_templates_only` option is selected, then just the policy templates defined
in the manifest will be available in Kibana without the specific policy template for the whole integration. If the `default` option
is selected, then Kibana keeps the same behaviour described above.
is selected, then Kibana keeps the same behavior described above.
type: string
policy_templates:
description: List of policy templates offered by this package.
Expand Down Expand Up @@ -507,13 +507,13 @@ spec:
maxItems: 1
then:
properties:
policy_templates_behaviour:
policy_templates_behavior:
enum:
- default
default: default
else:
properties:
policy_templates_behaviour:
policy_templates_behavior:
enum:
- integration_package_only
- policy_templates_only
Expand Down

0 comments on commit c4a5290

Please sign in to comment.