Skip to content
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
3 changes: 3 additions & 0 deletions schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ type ProviderSchema struct {

// The schemas for resources identities in this provider.
ResourceIdentitySchemas map[string]*IdentitySchema `json:"resource_identity_schemas,omitempty"`

// The schemas for any list resources in this provider.
ListResourceSchemas map[string]*Schema `json:"list_resource_schemas,omitempty"`
}

// Schema is the JSON representation of a particular schema
Expand Down
3 changes: 3 additions & 0 deletions schemas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ func TestProviderSchemasValidate(t *testing.T) {
"a provider schema including resource identity schemas is validated": {
testDataPath: "testdata/identity/schemas.json",
},
"a provider schema including list resource schemas is validated": {
testDataPath: "testdata/list_resources/schemas.json",
},
}

for tn, tc := range cases {
Expand Down
1 change: 1 addition & 0 deletions testdata/list_resources/schemas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"format_version":"0.1","provider_schemas":{"registry.terraform.io/hashicorp/null":{"provider":{"version":0,"block":{"description_kind":"plain"}},"list_resource_schemas":{"null_resource":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"triggers":{"type":["map","string"],"description_kind":"plain","optional":true}},"description_kind":"plain"}}}}}}
Loading