Class CfnConfig
- java.lang.Object
- 
- software.amazon.smithy.jsonschema.JsonSchemaConfig
- 
- software.amazon.smithy.aws.cloudformation.schema.CfnConfig
 
 
- 
 public final class CfnConfig extends JsonSchemaConfig "cloudformation" smithy-build plugin configuration settings.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class software.amazon.smithy.jsonschema.JsonSchemaConfigJsonSchemaConfig.MapStrategy, JsonSchemaConfig.UnionStrategy
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringSCHEMA_COMPONENTS_POINTERThe JSON pointer to where CloudFormation schema shared resource properties should be written.
 - 
Constructor SummaryConstructors Constructor Description CfnConfig()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CfnConfigfromNode(Node settings)Creates a CfnConfig from a Node value.booleangetDisableCapitalizedProperties()booleangetDisableDeprecatedPropertyGeneration()booleangetDisableHandlerPermissionGeneration()booleangetDisableRequiredPropertyGeneration()java.util.List<java.lang.String>getExternalDocs()java.util.Map<ShapeId,java.util.Map<java.lang.String,Node>>getJsonAdd()java.lang.StringgetOrganizationName()java.lang.StringgetServiceName()java.util.List<java.lang.String>getSourceDocs()voidsetAlphanumericOnlyRefs(boolean alphanumericOnlyRefs)Creates shape name pointers that strip out non-alphanumeric characters.voidsetDisableCapitalizedProperties(boolean disableCapitalizedProperties)Set to true to disable automatically capitalizing names of properties of Resource Schemas.voidsetDisableDeprecatedPropertyGeneration(boolean disableDeprecatedPropertyGeneration)Set to true to disable generatingdeprecatedPropertiesfor Resource Schemas.voidsetDisableHandlerPermissionGeneration(boolean disableHandlerPermissionGeneration)Set to true to disable generatinghandlerproperty'spermissionslists for Resource Schemas.voidsetDisableRequiredPropertyGeneration(boolean disableRequiredPropertyGeneration)Set to true to disable generatingrequiredfor Resource Schemas.voidsetExternalDocs(java.util.List<java.lang.String> externalDocs)Limits the source of converted "externalDocs" fields to the specified priority ordered list of names in an externalDocumentation trait.voidsetJsonAdd(java.util.Map<ShapeId,java.util.Map<java.lang.String,Node>> jsonAdd)Adds or replaces the JSON value in the generated resource schema document at the given JSON pointer locations with a different JSON value.voidsetJsonSchemaVersion(JsonSchemaVersion schemaVersion)Set the JSON schema version to use when converting Smithy shapes into Json Schema.voidsetMapStrategy(JsonSchemaConfig.MapStrategy mapStrategy)Configures how Smithy map shapes are converted to JSON Schema.voidsetOrganizationName(java.lang.String organizationName)Sets the "Organization" component for each of the generated resource's type name.voidsetServiceName(java.lang.String serviceName)Sets the "Service" component for each of the generated resource's type name.voidsetSourceDocs(java.util.List<java.lang.String> sourceDocs)Limits the source of converted "sourceDocs" fields to the specified priority ordered list of names in an externalDocumentation trait.voidsetUnionStrategy(JsonSchemaConfig.UnionStrategy unionStrategy)Configures how Smithy union shapes are converted to JSON Schema.voidsetUseJsonName(boolean useJsonName)Uses the value of the jsonName trait when creating JSON schema properties for structure and union shapes.- 
Methods inherited from class software.amazon.smithy.jsonschema.JsonSchemaConfigdetectJsonTimestampFormat, getAddReferenceDescriptions, getAlphanumericOnlyRefs, getDefaultTimestampFormat, getDefinitionPointer, getDisableDefaultValues, getDisableFeatures, getDisableIntEnums, getExtensions, getExtensions, getJsonSchemaVersion, getMapStrategy, getSchemaDocumentExtensions, getService, getSupportNonNumericFloats, getUnionStrategy, getUseIntegerType, getUseJsonName, isEnableOutOfServiceReferences, putExtension, putExtension, putExtension, putExtensions, setAddReferenceDescriptions, setDefaultTimestampFormat, setDefinitionPointer, setDisableDefaultValues, setDisableFeatures, setDisableIntEnums, setEnableOutOfServiceReferences, setExtensions, setSchemaDocumentExtensions, setService, setSupportNonNumericFloats, setUseIntegerType
 
- 
 
- 
- 
- 
Field Detail- 
SCHEMA_COMPONENTS_POINTERpublic static final java.lang.String SCHEMA_COMPONENTS_POINTER The JSON pointer to where CloudFormation schema shared resource properties should be written.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setAlphanumericOnlyRefspublic void setAlphanumericOnlyRefs(boolean alphanumericOnlyRefs) Description copied from class:JsonSchemaConfigCreates shape name pointers that strip out non-alphanumeric characters.This is necessary for compatibility with some vendors like Amazon API Gateway that only allow alphanumeric shape names. - Overrides:
- setAlphanumericOnlyRefsin class- JsonSchemaConfig
- Parameters:
- alphanumericOnlyRefs- Set to true to strip non-alphanumeric characters.
 
 - 
getDisableHandlerPermissionGenerationpublic boolean getDisableHandlerPermissionGeneration() 
 - 
setDisableHandlerPermissionGenerationpublic void setDisableHandlerPermissionGeneration(boolean disableHandlerPermissionGeneration) Set to true to disable generatinghandlerproperty'spermissionslists for Resource Schemas.By default, handler permissions are automatically added to the handlerproperty'spermissionslist. This includes the lifecycle operation used and any permissions listed in theaws.iam#requiredActionstrait.- Parameters:
- disableHandlerPermissionGeneration- True to disable handler- permissionsgeneration
 
 - 
getDisableDeprecatedPropertyGenerationpublic boolean getDisableDeprecatedPropertyGeneration() 
 - 
setDisableDeprecatedPropertyGenerationpublic void setDisableDeprecatedPropertyGeneration(boolean disableDeprecatedPropertyGeneration) Set to true to disable generatingdeprecatedPropertiesfor Resource Schemas.By default, deprecated members are automatically added to the deprecatedPropertiesschema property.- Parameters:
- disableDeprecatedPropertyGeneration- True to disable- deprecatedPropertiesgeneration, false otherwise.
 
 - 
getDisableRequiredPropertyGenerationpublic boolean getDisableRequiredPropertyGeneration() 
 - 
setDisableRequiredPropertyGenerationpublic void setDisableRequiredPropertyGeneration(boolean disableRequiredPropertyGeneration) Set to true to disable generatingrequiredfor Resource Schemas.By default, required members are automatically added to the requiredschema property.- Parameters:
- disableRequiredPropertyGeneration- True to disable- requiredgeneration, false otherwise.
 
 - 
getDisableCapitalizedPropertiespublic boolean getDisableCapitalizedProperties() 
 - 
setDisableCapitalizedPropertiespublic void setDisableCapitalizedProperties(boolean disableCapitalizedProperties) Set to true to disable automatically capitalizing names of properties of Resource Schemas.By default, property names of Resource Schemas are capitalized if no cfnNametrait is applied.- Parameters:
- disableCapitalizedProperties- True to disable capitalizing property names, false otherwise.
 
 - 
getExternalDocspublic java.util.List<java.lang.String> getExternalDocs() 
 - 
setExternalDocspublic void setExternalDocs(java.util.List<java.lang.String> externalDocs) Limits the source of converted "externalDocs" fields to the specified priority ordered list of names in an externalDocumentation trait.This list is case insensitive. By default, this is a list of the following values: "Documentation Url", "DocumentationUrl", "API Reference", "User Guide", "Developer Guide", "Reference", and "Guide". - Parameters:
- externalDocs- External docs to look for and convert, in order.
 
 - 
setJsonAddpublic void setJsonAdd(java.util.Map<ShapeId,java.util.Map<java.lang.String,Node>> jsonAdd) Adds or replaces the JSON value in the generated resource schema document at the given JSON pointer locations with a different JSON value.The value must be a map where each key is a resource shape ID. The value is a map where each key is a valid JSON pointer string as defined in RFC 6901. Each value in the nested map is the JSON value to add or replace at the given target. Values are added using similar semantics of the "add" operation of JSON Patch, as specified in RFC 6902, with the exception that adding properties to an undefined object will create nested objects in the result as needed. - Parameters:
- jsonAdd- Map of JSON path to values to patch in.
 
 - 
setUseJsonNamepublic void setUseJsonName(boolean useJsonName) Description copied from class:JsonSchemaConfigUses the value of the jsonName trait when creating JSON schema properties for structure and union shapes.This property has no effect if a PropertyNamingStrategyis manually configured on aJsonSchemaConverter.- Overrides:
- setUseJsonNamein class- JsonSchemaConfig
- Parameters:
- useJsonName- Set to true to use jsonName traits when creating refs..
 
 - 
setMapStrategypublic void setMapStrategy(JsonSchemaConfig.MapStrategy mapStrategy) Description copied from class:JsonSchemaConfigConfigures how Smithy map shapes are converted to JSON Schema.- Overrides:
- setMapStrategyin class- JsonSchemaConfig
- Parameters:
- mapStrategy- The map strategy to use.
 
 - 
getOrganizationNamepublic java.lang.String getOrganizationName() 
 - 
setOrganizationNamepublic void setOrganizationName(java.lang.String organizationName) Sets the "Organization" component for each of the generated resource's type name.This value defaults to "AWS" if the aws.api#servicetrait is present. Otherwise, the value is required configuration.- Parameters:
- organizationName- Name to use for the "Organization" component of resource type names.
- See Also:
- Type Name
 
 - 
getServiceNamepublic java.lang.String getServiceName() 
 - 
setServiceNamepublic void setServiceName(java.lang.String serviceName) Sets the "Service" component for each of the generated resource's type name.This value defaults to the value of the aws.api#service/cloudFormationNameif the trait is present. Otherwise, the value defaults to the shape name of the specified service shape.- Parameters:
- serviceName- Name to use for the "Service" component of resource type names.
- See Also:
- Type Name
 
 - 
getSourceDocspublic java.util.List<java.lang.String> getSourceDocs() 
 - 
setSourceDocspublic void setSourceDocs(java.util.List<java.lang.String> sourceDocs) Limits the source of converted "sourceDocs" fields to the specified priority ordered list of names in an externalDocumentation trait.This list is case insensitive. By default, this is a list of the following values: "Source Url", "SourceUrl", "Source", and "Source Code". - Parameters:
- sourceDocs- Source docs to look for and convert, in order.
 
 - 
setUnionStrategypublic void setUnionStrategy(JsonSchemaConfig.UnionStrategy unionStrategy) Description copied from class:JsonSchemaConfigConfigures how Smithy union shapes are converted to JSON Schema.- Overrides:
- setUnionStrategyin class- JsonSchemaConfig
- Parameters:
- unionStrategy- The union strategy to use.
 
 - 
fromNodepublic static CfnConfig fromNode(Node settings) Creates a CfnConfig from a Node value.This method uses the NodeMapperon the converted input object. Note that this class can be deserialized using a NodeMapper too since the NodeMapper will look for a static, public, fromNode method.This method also serializes unknown properties into the "extensions" map so that they are accessible to CfnMapper implementations. - Parameters:
- settings- Input to deserialize.
- Returns:
- Returns the deserialized
 
 - 
setJsonSchemaVersionpublic void setJsonSchemaVersion(JsonSchemaVersion schemaVersion) Description copied from class:JsonSchemaConfigSet the JSON schema version to use when converting Smithy shapes into Json Schema.- Overrides:
- setJsonSchemaVersionin class- JsonSchemaConfig
- Parameters:
- schemaVersion- JSON Schema version to use for generated schema
 
 
- 
 
-