Skip to content
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

Support Description field in corresponding entities #1057

Merged
merged 1 commit into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions parsers/yamlparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ type Action struct {
Limits *Limits `yaml:"limits"`
Inputs map[string]Parameter `yaml:"inputs"`
Outputs map[string]Parameter `yaml:"outputs"`
Description string `yaml:"description,omitempty"`
Annotations map[string]interface{} `yaml:"annotations,omitempty"`
Include [][]string `yaml:"include,omitempty"`
Exclude []string `yaml:"exclude,omitempty"`
Expand Down Expand Up @@ -159,6 +160,7 @@ type Trigger struct {
Credential string `yaml:"credential"`
Inputs map[string]Parameter `yaml:"inputs"`
Name string
Description string `yaml:"description,omitempty"`
Annotations map[string]interface{} `yaml:"annotations,omitempty"`
// TODO() this is propoagated from package to trigger within that package
//Parameters map[string]interface{} `yaml:parameters`
Expand All @@ -185,6 +187,7 @@ type Rule struct {
Rule string `yaml:"rule"` //used in manifest.yaml
//mapping to wsk.Rule.Name
Name string
Description string `yaml:"description,omitempty"`
Annotations map[string]interface{} `yaml:"annotations,omitempty"`
}

Expand Down Expand Up @@ -216,6 +219,7 @@ type Package struct {
Rules map[string]Rule `yaml:"rules"`
Inputs map[string]Parameter `yaml:"inputs"`
Sequences map[string]Sequence `yaml:"sequences"`
Description string `yaml:"description,omitempty"`
Annotations map[string]interface{} `yaml:"annotations,omitempty"`
Apis map[string]map[string]map[string]map[string]APIMethodResponse `yaml:"apis"`
}
Expand Down
1 change: 1 addition & 0 deletions tests/dat/manifest_validate_package_grammar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ packages:
helloworld:
version: 1.0
license: Apache-2.0
description: Foo Bar
1 change: 1 addition & 0 deletions tests/dat/manifest_validate_package_grammar_env_var.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ packages:
$package_name:
version: 1.0
license: Apache-2.0
description: Foo Bar
$package_name_second:
version: 1.0
license: Apache-2.0
Expand Down
4 changes: 4 additions & 0 deletions tests/dat/manifest_validate_trigger_action_rule_grammar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ packages:
license: Apache-2.0
actions:
first_action:
description: Foo Bar 1
function: actions/dump_params.js
second_action:
description: Foo Bar 2
function: actions/dump_params.js
third_action:
function: actions/dump_params.js
Expand All @@ -32,9 +34,11 @@ packages:
trigger2:
rules:
rule1:
description: Foo Bar 1
trigger: trigger1
action: first_action
rule3:
description: Foo Bar 2
trigger: trigger2
action: second_action
rule2:
Expand Down