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 moreSource§impl Debug for AdditionalSchemaSource
impl Debug for AdditionalSchemaSource
Source§impl<'de> Deserialize<'de> for AdditionalSchemaSource
impl<'de> Deserialize<'de> for AdditionalSchemaSource
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdditionalSchemaSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdditionalSchemaSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for AdditionalSchemaSource
impl Serialize for AdditionalSchemaSource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for AdditionalSchemaSource
impl RefUnwindSafe for AdditionalSchemaSource
impl Send for AdditionalSchemaSource
impl Sync for AdditionalSchemaSource
impl Unpin for AdditionalSchemaSource
impl UnsafeUnpin for AdditionalSchemaSource
impl UnwindSafe for AdditionalSchemaSource
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer