Subresource on same line generates invalid default constructor.
Closed this issue · 0 comments
ullgren commented
Describe the bug
When a resource with a sub-resource is defined on the same line the default constructor of the parent resource class does not properly initialize the sub-resource.
To Reproduce
Steps to reproduce the behavior:
- Create a RAML that contains the following resource definition.
/projects/rename:
put:
description: Rename a project
body:
#schema: projectName
responses:
202:
404:
- Generate client code
- Try to compile the generated source
- There is a error The blank final field rename may not have been initialized on the default constructor for the projects resource class (
resource/projects/Projects.java
).
Expected behavior
The subresource attribute should be initialized to null
in the default constructor as is the case when defining the subresource on a second line.