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

Open
#348 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
cli, devtools

Research direction

Reproduce the warning with cfn 0.2.1 by running cfn init for a Java resource and selecting codegen model 1. Start with the generated ResourceModel.java path and the RPDK log entries shown in the report, then trace which generation step handles the date-time format. Done means cfn init completes without the reported warning and the generated model is produced as expected.

Written by the indexing model from the issue text.

Description

bug
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'
Dominant language
Java
Stars
30
Forks
48
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-cloudformation/cloudformation-cli-java-plugin

All issues in aws-cloudformation/cloudformation-cli-java-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.