Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfn init shows warning: Could not find specified format 'date-time' for type 'string'. Defaulting to 'String' #348

Open
miparnisari opened this issue Jan 11, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@miparnisari
Copy link
Contributor

MacBook@ ~/workspace/test-r-p $ cfn --version
cfn 0.2.1
MacBook@ ~/workspace/test-r-p $ cfn init
Initializing new project
Do you want to develop a new resource(r) or a module(m)?.
>> r
What's the name of your resource type?
(Organization::Service::Resource)
>> mparnisa::test::rp
Select a language for code generation:
[1] go
[2] java
[3] python36
[4] python37
(enter an integer):
>> 2
Enter a package name (empty for default 'com.mparnisa.test.rp'):
>>
Choose codegen model - 1 (default) or 2 (guided-aws):
>> 1
Could not find specified format 'date-time' for type 'string'. Defaulting to 'String'
Could not find specified format 'date-time' for type 'string'. Defaulting to 'String'
Initialized a new project in /Users/mparnisa/workspace/test-r-p

In the RPDK log:

[2021-01-11T22:30:50Z] DEBUG    - ResourceModel POJO: /Users/mparnisa/workspace-sync/test-r-p/target/generated-sources/rpdk/com/mparnisa/test/rp/ResourceModel.java
[2021-01-11T22:30:50Z] ERROR    - Could not find specified format 'date-time' for type 'string'. Defaulting to 'String'
[2021-01-11T22:30:50Z] ERROR    - Could not find specified format 'date-time' for type 'string'. Defaulting to 'String'
[2021-01-11T22:30:50Z] DEBUG    - Overwriting '/Users/mparnisa/workspace-sync/test-r-p/target/generated-sources/rpdk/com/mparnisa/test/rp/ResourceModel.java'
@johnttompkins
Copy link
Contributor

going to transfer to java repo as this is an issue with: https://github.com/aws-cloudformation/cloudformation-cli-java-plugin#alternate-type-formats

specifically this error message: https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/blob/master/python/rpdk/java/resolver.py#L26

We will generate different end language types for a given property if a format is specified. For example, int64 format for an integer will generate a java Long type. This message shows that we do not support date-time. We should probably update the example schema or support the date time format in java so users don't see this when initializing a new project.

@johnttompkins johnttompkins transferred this issue from aws-cloudformation/cloudformation-cli Jan 20, 2021
@anshikg anshikg added the bug Something isn't working label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants