Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

cfn generate not creating models.

Đang mở
#103 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@mmaeng đang làm issue này rồi.

Từ ngày 28/4/2023.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Typescript resource models are not being generated by cfn generate. A similar workflow using java generates the S3 and BucketPolicy models, but nothing with typescript.

Environment Details:
Windows 10 Pro
cfn 0.2.28
Python 3.10.10
Node v18.13.0

Same results with:
Mac OS 12.6.3
cfn 0.2.28
Python 3.9.16
Node v18.12.1

Hook spec:

{
    "typeName": "MyCompany::Test::Hook",
    "description": "Test",
    "sourceUrl": "https://github.com/maclema/test",
    "documentationUrl": "https://github.com/maclema/test/README.md",
    "typeConfiguration": {
        "properties": {},
        "additionalProperties": false
    },
    "required": [],
    "handlers": {
        "preCreate": {
            "targetNames": [
                "AWS::S3::Bucket",
                "AWS::S3::BucketPolicy"
            ],
            "permissions": []
        },
        "preUpdate": {
            "targetNames": [
                "AWS::S3::Bucket",
                "AWS::S3::BucketPolicy"
            ],
            "permissions": []
        },
        "preDelete": {
            "targetNames": [
                "AWS::S3::Bucket",
                "AWS::S3::BucketPolicy"
            ],
            "permissions": []
        }
    },
    "additionalProperties": false
}

cfn generate output:

Generated files for **MyCompany::Test::Hook**

Resulting models.ts file:

// This is a generated file. Modifications will be overwritten.
import { BaseModel, Dict, integer, Integer, Optional, transformValue } from '@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib';
import { Exclude, Expose, Type, Transform } from 'class-transformer';

export class TypeConfigurationModel extends BaseModel {
    ['constructor']: typeof TypeConfigurationModel;



}

rpdk.log

[2023-04-01T21:16:00Z] DEBUG    - Logging set up successfully
[2023-04-01T21:16:00Z] DEBUG    - Running generate: Namespace(version=False, subparser_name='generate', command=<function generate at 0x00000179DB618670>, verbose=0, endpoint_url=None, region=None, local_only=False, target_schemas=[])
[2023-04-01T21:16:00Z] DEBUG    - Root directory: C:\Users\Matt\Documents\cfn_hooks
[2023-04-01T21:16:00Z] DEBUG    - Loading project file 'C:\Users\Matt\Documents\cfn_hooks\.rpdk-config'
[2023-04-01T21:16:00Z] INFO     - Validating your hook specification...
[2023-04-01T21:16:00Z] DEBUG    - Rewriting refs in '<BASE>' (file:///C:/Users/Matt/Documents/cfn_hooks/mycompany-test-hook.json)
[2023-04-01T21:16:00Z] DEBUG    - Writing Execution Role CloudFormation template: C:\Users\Matt\Documents\cfn_hooks\hook-role.yaml
[2023-04-01T21:16:00Z] DEBUG    - Overwriting 'C:\Users\Matt\Documents\cfn_hooks\hook-role.yaml'
[2023-04-01T21:16:00Z] DEBUG    - Hook schema target names: {'AWS::S3::BucketPolicy', 'AWS::S3::Bucket'}
[2023-04-01T21:16:00Z] DEBUG    - Resolving the following type names: {'AWS::S3::BucketPolicy', 'AWS::S3::Bucket'}
[2023-04-01T21:16:00Z] DEBUG    - Retrieving info for following target names: {'AWS::S3::BucketPolicy', 'AWS::S3::Bucket'}
[2023-04-01T21:16:00Z] DEBUG    - Retrieving info for type: AWS::S3::BucketPolicy
[2023-04-01T21:16:01Z] DEBUG    - Retrieving info for type: AWS::S3::Bucket
[2023-04-01T21:16:01Z] DEBUG    - Generate started
[2023-04-01T21:16:01Z] DEBUG    - Writing file: C:\Users\Matt\Documents\cfn_hooks\src\models.ts
[2023-04-01T21:16:01Z] DEBUG    - Overwriting 'C:\Users\Matt\Documents\cfn_hooks\src\models.ts'
[2023-04-01T21:16:01Z] DEBUG    - Generate complete
[2023-04-01T21:16:01Z] DEBUG    - Removing generated docs: C:\Users\Matt\Documents\cfn_hooks\docs
[2023-04-01T21:16:01Z] DEBUG    - Writing generated docs
[2023-04-01T21:16:01Z] DEBUG    - Finished documenting nested properties
[2023-04-01T21:16:01Z] DEBUG    - Writing docs README: C:\Users\Matt\Documents\cfn_hooks\docs\README.md
[2023-04-01T21:16:01Z] WARNING  - Generated files for MyCompany::Test::Hook
[2023-04-01T21:16:01Z] DEBUG    - Finished generate

Ngôn ngữ chính
TypeScript
Star
46
Fork
18
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws-cloudformation/cloudformation-cli-typescript-plugin

Tất cả issue của aws-cloudformation/cloudformation-cli-typescript-plugin

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.