How to use the @aws-cdk/cfnspec.schema.isPropertyBag function in @aws-cdk/cfnspec

To help you get started, we’ve selected a few @aws-cdk/cfnspec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / tools / cfn2ts / lib / codegen.ts View on Github external
private renderCodeName(context: genspec.CodeName, type: genspec.CodeName): string {
    const rel = type.relativeTo(context);
    const specType = rel.specName && this.spec.PropertyTypes[rel.specName.fqn];
    if (!specType || schema.isPropertyBag(specType)) {
      return rel.fqn;
    }
    return this.findNativeType(context, specType);
  }
github aws / aws-cdk / tools / cfn2ts / lib / codegen.ts View on Github external
private emitPropertyTypes(resourceName: string, resourceClass: genspec.CodeName): void {
    const prefix = `${resourceName}.`;
    for (const name of Object.keys(this.spec.PropertyTypes).sort()) {
      if (!name.startsWith(prefix)) { continue; }
      const cfnName = PropertyAttributeName.parse(name);
      const propTypeName = genspec.CodeName.forPropertyType(cfnName, resourceClass);
      const type = this.spec.PropertyTypes[name];
      if (schema.isPropertyBag(type)) {
        this.emitPropertyType(resourceClass, propTypeName, type);
      }
    }
  }
github aws / aws-cdk / tools / cfn2ts / lib / codegen.ts View on Github external
visitScalar(type: genspec.CodeName) {
          const specType = type.specName && self.spec.PropertyTypes[type.specName.fqn];
          if (specType && !schema.isPropertyBag(specType)) {
            return genspec.typeDispatch(resource, specType, this);
          }
          return genspec.validatorName(type).fqn;
        },
        visitUnionScalar(types: genspec.CodeName[]) {