additional schema handling comment

This commit is contained in:
James Bardin 2023-07-06 15:53:08 -04:00
parent 76332db98d
commit a77baa866d
2 changed files with 8 additions and 2 deletions

View File

@ -74,6 +74,11 @@ type Interface interface {
Close() error
}
// GetProviderSchemaResponse is the return type for GetProviderSchema, and
// should only be used when handling a value for that method. The handling of
// of schemas in any other context should always use ProviderSchema, so that
// the in-memory representation can be more easily changed separately from the
// RCP protocol.
type GetProviderSchemaResponse struct {
// Provider is the schema for the provider itself.
Provider Schema

View File

@ -8,8 +8,9 @@ import (
"github.com/hashicorp/terraform/internal/configs/configschema"
)
// ProviderSchema is an overall container for all of the schemas for all configurable
// objects defined within a particular provider.
// ProviderSchema is an overall container for all of the schemas for all
// configurable objects defined within a particular provider. All storage of
// provider schemas should use this type.
type ProviderSchema = GetProviderSchemaResponse
// SchemaForResourceType attempts to find a schema for the given mode and type.