Codegen doesn't support nullable types
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
The failure is in rpdk/java/pojo_resolver.py, in _java_property_type, reached by cfn-cli generate; start there and reproduce with the nullable Canceled schema. Done means generation succeeds for the ["integer", "null"] property without the unhashable-list error.
Written by the indexing model from the issue text.
Description
This is the property that I’m trying to define:
"Canceled": {
"description": "POSIX Timestamp of cancellation of this downtime (null if not canceled)",
"type": ["integer", "null"]
},
This should be ok according to JsonSchema, but cfn-cli generate fails and rpdk.log contains this:
Traceback (most recent call last):
File "/Users/.../programming/aws-cloudformation-rpdk-nightly/env/lib/python3.7/site-packages/rpdk/core/cli.py", line 95, in main
args.command(args)
File "/Users/.../programming/aws-cloudformation-rpdk-nightly/env/lib/python3.7/site-packages/rpdk/core/generate.py", line 15, in generate
project.generate()
File "/Users/.../programming/aws-cloudformation-rpdk-nightly/env/lib/python3.7/site-packages/rpdk/core/project.py", line 190, in generate
return self._plugin.generate(self)
File "/Users/.../programming/aws-cloudformation-rpdk-nightly/env/lib/python3.7/site-packages/rpdk/java/codegen.py", line 255, in generate
pojos = pojo_resolver.resolve_pojos()
File "/Users/.../programming/aws-cloudformation-rpdk-nightly/env/lib/python3.7/site-packages/rpdk/java/pojo_resolver.py", line 58, in resolve_pojos
java_property_map[prop_name] = self._java_property_type(prop_schema)
File "/Users/.../programming/aws-cloudformation-rpdk-nightly/env/lib/python3.7/site-packages/rpdk/java/pojo_resolver.py", line 88, in _java_property_type
return primitive_types_map[json_type]
TypeError: unhashable type: 'list'
- Dominant language
- Java
- Stars
- 30
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-cloudformation/cloudformation-cli-java-plugin
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
aws-cloudformation/cloudformation-cli-java-plugin#415 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
injectCredentialsAndInvokeV2 method in proxy class doesn't support API's like PutObject from S3. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in aws-cloudformation/cloudformation-cli-java-plugin
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100