-
-
Couldn't load subscription status.
- Fork 773
Pack config: Process defaults and datastore values in patternProperties and additionalItems #5321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cognifloyd
merged 22 commits into
StackStorm:master
from
cognifloyd:pack-config-more-jsonschema
Jul 9, 2022
Merged
Changes from 7 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
4b52790
Process defaults and datastore values in more pack config locations
cognifloyd 4c637ec
do not edit object_schema
cognifloyd 6ed8e5d
do not use six on new lines of code
cognifloyd af936f2
Merge branch 'master' into pack-config-more-jsonschema
cognifloyd e679487
Add tests for pack config patternProperties and additionalItems
cognifloyd 8105360
Fix list access in config_loader._assign_default_values
cognifloyd 9aead0f
Add changelog entry
cognifloyd 1926ec7
Merge branch 'master' into pack-config-more-jsonschema
cognifloyd ba06db4
Move changelog entry
cognifloyd 8bffa2f
Refactor var/method names for clarity
cognifloyd bbfb510
extend docstring for pack config array schema handling
cognifloyd 3d8b2f6
refactor var naming in pack config items schema handling for clarity
cognifloyd 2c9ebf1
typo
cognifloyd b62016a
refactor pack config properties schema flattening for clarity
cognifloyd 815b415
typo
cognifloyd 398539e
add order of precedence test for config_loader
cognifloyd 5931e6d
patternProperties matches all patterns against all keys
cognifloyd 62761ca
improve code comments
cognifloyd 7110c75
fix syntax in schema merging
cognifloyd 1463f4d
fix test pack fixture usage
cognifloyd a5084e7
add a pack config test for additionalItems: true
cognifloyd 36ecc4d
Merge branch 'master' into pack-config-more-jsonschema
cognifloyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
24 changes: 24 additions & 0 deletions
24
...ests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/config.schema.yaml
This file contains hidden or 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,24 @@ | ||
| --- | ||
| region: | ||
| type: "string" | ||
| required: false | ||
| default: "us-east-1" | ||
| profiles: | ||
| type: "array" | ||
| required: false | ||
| additionalItems: | ||
cognifloyd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| host: | ||
| type: "string" | ||
| required: false | ||
| default: "127.0.0.3" | ||
| port: | ||
| type: "integer" | ||
| required: false | ||
| default: 8080 | ||
| token: | ||
| type: "string" | ||
| required: true | ||
| secret: true | ||
6 changes: 6 additions & 0 deletions
6
st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_additional_items_1/pack.yaml
This file contains hidden or 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,6 @@ | ||
| --- | ||
| name : dummy_pack_schema_with_additional_items_1 | ||
| description : dummy pack with nested objects under additionalItems | ||
| version : 0.1.0 | ||
| author : st2-dev | ||
| email : [email protected] |
25 changes: 25 additions & 0 deletions
25
...ts/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/config.schema.yaml
This file contains hidden or 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,25 @@ | ||
| --- | ||
| region: | ||
| type: "string" | ||
| required: false | ||
| default: "us-east-1" | ||
| profiles: | ||
| type: "object" | ||
| required: false | ||
| patternProperties: | ||
| "^\\w+$": | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| host: | ||
| type: "string" | ||
| required: false | ||
| default: "127.0.0.3" | ||
| port: | ||
| type: "integer" | ||
| required: false | ||
| default: 8080 | ||
| token: | ||
| type: "string" | ||
| required: true | ||
| secret: true |
6 changes: 6 additions & 0 deletions
6
st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_pattern_properties_1/pack.yaml
This file contains hidden or 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,6 @@ | ||
| --- | ||
| name : dummy_pack_schema_with_pattern_properties_1 | ||
| description : dummy pack with nested objects under patternProperties | ||
| version : 0.1.0 | ||
| author : st2-dev | ||
| email : [email protected] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.