Improper code generation when a property is resolved to be Map<String, ANonYetExistingObject>
See original GitHub issueI have the following field in my JSON Schema:
"metrics": {
"type": "object",
"description": "",
"additionalProperties": {
"$ref": "#/definitions/istio_adapter_dogstatsd_Params_MetricInfo",
"javaType": "me.snowdrop.istio.adapter.dogstatsd.MetricInfo"
},
"javaType": "java.util.Map\u003cString,me.snowdrop.istio.adapter.dogstatsd.MetricInfo\u003e"
},
This properly creates a Map<String,MetricInfo>
with a proper import, however, the ref
is never resolved and therefore the MetricInfo
class is never created, even though the schema properly contains a istio_adapter_dogstatsd_Params_MetricInfo
definition.
The issue seems to be in ObjectRule.createClass
in particular this part which resolves the type as Map
and throws ClassAlreadyExistsException
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Visual studio shows endless messages "Code generation for ...
Code generation for property 'valueMember' failed. Error was: 'Object reference not set to an instance of an object.' This happens now often ...
Read more >PROPERTY CODE TITLE 1. GENERAL PROVISIONS ...
(b) A manufactured home is real property if: (1) the statement of ownership and location for the home issued under Section 1201.207, Occupations ......
Read more >Resolve property matching issues - Hotel Center Help
A property matching issue occurs when your property is “Not matched” because Google was unable to find a Google Maps location for your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks, works for me that way.
If you simply add a top-level schema file with a $ref to
#/definitions/kubernetes_apiextensions_JSONSchemaPropsOrStringArray
then the type you need will be generated. Then you can refer to it in the same way in your Map definition.