pub struct AdditionalSchemaSource {
pub type_name: Option<String>,
pub schema: String,
}Expand description
A single additional CloudFormation resource provider schema to overlay on top of the bundled schemas.
type_name identifies the resource type (e.g., "AWS::Lambda::Function").
When absent (None), the typeName field inside the schema JSON is used
instead. When both are present they must agree.
schema is the complete resource provider schema as a JSON string, in the
standard CloudFormation registry format.
Fields§
§type_name: Option<String>The resource type name (e.g., "AWS::Lambda::Function"). When absent, the
typeName field of the schema JSON is used instead. When both are
present they must agree.
schema: StringThe complete resource provider schema as a JSON string, in the standard CloudFormation registry format.
Implementations§
Source§impl AdditionalSchemaSource
impl AdditionalSchemaSource
Sourcepub fn resolve(&self) -> Result<(String, Value), SchemaSourceError>
pub fn resolve(&self) -> Result<(String, Value), SchemaSourceError>
Parse the schema JSON and resolve the effective resource type name into the
(type_name, schema) pair the schema validator consumes.
Returns an error when the schema is not valid JSON, is not a JSON object, provides no resource type name at all, or names one type explicitly and a different one in the schema body - a contradiction that is far more likely to be a copy/paste mistake than an intentional rename.
Trait Implementations§
Source§impl Clone for AdditionalSchemaSource
impl Clone for AdditionalSchemaSource
Source§fn clone(&self) -> AdditionalSchemaSource
fn clone(&self) -> AdditionalSchemaSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more