Skip to content

Commit

Permalink
Add resource-level description to specifications
Browse files Browse the repository at this point in the history
Closes: #159
  • Loading branch information
kklimonda-cl committed Sep 24, 2024
1 parent 73cfe3f commit 222e2ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/properties/normalized.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const (
)

type TerraformProviderConfig struct {
Description string `json:"description" yaml:"description"`
SkipResource bool `json:"skip_resource" yaml:"skip_resource"`
SkipDatasource bool `json:"skip_datasource" yaml:"skip_datasource"`
SkipDatasourceListing bool `json:"skip_datasource_listing" yaml:"skip_datasource_listing"`
Expand Down Expand Up @@ -528,6 +529,7 @@ func schemaToSpec(object object.Object) (*Normalization, error) {
spec := &Normalization{
Name: object.DisplayName,
TerraformProviderConfig: TerraformProviderConfig{
Description: object.TerraformConfig.Description,
SkipResource: object.TerraformConfig.SkipResource,
SkipDatasource: object.TerraformConfig.SkipDatasource,
SkipDatasourceListing: object.TerraformConfig.SkipdatasourceListing,
Expand Down
1 change: 1 addition & 0 deletions pkg/schema/object/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
)

type TerraformConfig struct {
Description string `yaml:"description"`
SkipResource bool `yaml:"skip_resource"`
SkipDatasource bool `yaml:"skip_datasource"`
SkipdatasourceListing bool `yaml:"skip_datasource_listing"`
Expand Down
1 change: 1 addition & 0 deletions specs/schema/object.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"additionalProperties": false,
"required": ["suffix"],
"properties": {
"description": { "type": "string" },
"resource_type": {
"type": "string",
"enum": ["entry", "config", "uuid", "custom"]
Expand Down

0 comments on commit 222e2ff

Please sign in to comment.