Skip to content

Commit 739a592

Browse files
actions: remove action types from action schema (#175)
Co-authored-by: Daniel Schmidt <[email protected]>
1 parent 2eaedbe commit 739a592

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

schemas.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -334,17 +334,6 @@ type IdentityAttribute struct {
334334

335335
// ActionSchema is the JSON representation of an action schema
336336
type ActionSchema struct {
337-
// The version of the action schema.
338-
Version uint64 `json:"version"`
339-
340337
// The root-level block of configuration values.
341338
Block *SchemaBlock `json:"block,omitempty"`
342-
343-
// Additional information about the action, only populated if the action is unlinked.
344-
Unlinked *UnlinkedSchemaType `json:"unlinked,omitempty"`
345-
}
346-
347-
// UnlinkedSchemaType contains any additional information about an unlinked action.
348-
type UnlinkedSchemaType struct {
349-
// Currently there is no additional information for unlinked action schema types
350339
}

schemas_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestProviderSchemas_writeOnlyAttribute(t *testing.T) {
8080
}
8181
}
8282

83-
func TestProviderSchemas_unlinked_action(t *testing.T) {
83+
func TestProviderSchemas_action(t *testing.T) {
8484
expectedAction := &ActionSchema{
8585
Block: &SchemaBlock{
8686
DescriptionKind: SchemaDescriptionKindPlain,
@@ -105,10 +105,9 @@ func TestProviderSchemas_unlinked_action(t *testing.T) {
105105
},
106106
},
107107
},
108-
Unlinked: &UnlinkedSchemaType{},
109108
}
110109

111-
f, err := os.Open("testdata/actions/unlinked_schemas.json")
110+
f, err := os.Open("testdata/actions/schemas.json")
112111
if err != nil {
113112
t.Fatal(err)
114113
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"format_version":"1.0","provider_schemas":{"registry.terraform.io/hashicorp/external":{"provider":{"version":0,"block":{"description_kind":"plain"}},"action_schemas":{"external":{"block":{"attributes":{"program":{"type":["list","string"],"description":"A list of strings, whose first element is the program to run and whose subsequent elements are optional command line arguments to the program.","description_kind":"plain","required":true},"query":{"type":["map","string"],"description":"A map of string values to pass to the external program as the query arguments. If not supplied, the program will receive an empty object as its input.","description_kind":"plain","optional":true},"working_dir":{"type":"string","description":"Working directory of the program. If not supplied, the program will run in the current directory.","description_kind":"plain","optional":true}},"description_kind":"plain"},"unlinked":{}}}}}}
1+
{"format_version":"1.0","provider_schemas":{"registry.terraform.io/hashicorp/external":{"provider":{"version":0,"block":{"description_kind":"plain"}},"action_schemas":{"external":{"block":{"attributes":{"program":{"type":["list","string"],"description":"A list of strings, whose first element is the program to run and whose subsequent elements are optional command line arguments to the program.","description_kind":"plain","required":true},"query":{"type":["map","string"],"description":"A map of string values to pass to the external program as the query arguments. If not supplied, the program will receive an empty object as its input.","description_kind":"plain","optional":true},"working_dir":{"type":"string","description":"Working directory of the program. If not supplied, the program will run in the current directory.","description_kind":"plain","optional":true}},"description_kind":"plain"}}}}}}

0 commit comments

Comments
 (0)