You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following RAML, which defines a type where I want to restrict the type of any additional properties. This is valid RAML based on the 1.0 specification. It seems that the // field is treated as having an empty string value as a name which throws an index out of bounds exception during code generation (please also see the stack trace below).
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at org.jsonschema2pojo.util.NameHelper.normalizeName(NameHelper.java:46)
at com.phoenixnap.oss.ramlplugin.raml2code.helpers.NamingHelper.cleanNameForJava(NamingHelper.java:362)
at com.phoenixnap.oss.ramlplugin.raml2code.helpers.NamingHelper.cleanNameForJava(NamingHelper.java:354)
at com.phoenixnap.oss.ramlplugin.raml2code.helpers.NamingHelper.getParameterName(NamingHelper.java:342)
at com.phoenixnap.oss.ramlplugin.raml2code.interpreters.ObjectTypeInterpreter.interpret(ObjectTypeInterpreter.java:171)
at com.phoenixnap.oss.ramlplugin.raml2code.helpers.RamlTypeHelper.mapTypeToPojo(RamlTypeHelper.java:100)
at com.phoenixnap.oss.ramlplugin.raml2code.data.ApiActionMetadata.parseResponse(ApiActionMetadata.java:228)
at com.phoenixnap.oss.ramlplugin.raml2code.data.ApiActionMetadata.(ApiActionMetadata.java:78)
at com.phoenixnap.oss.ramlplugin.raml2code.data.ApiResourceMetadata.addApiCall(ApiResourceMetadata.java:55)
at com.phoenixnap.oss.ramlplugin.raml2code.helpers.RamlParser.checkResource(RamlParser.java:167)
at com.phoenixnap.oss.ramlplugin.raml2code.helpers.RamlParser.extractControllers(RamlParser.java:77)
at com.phoenixnap.oss.ramlplugin.raml2code.plugin.SpringMvcEndpointGeneratorMojo.generateEndpoints(SpringMvcEndpointGeneratorMojo.java:284)
at com.phoenixnap.oss.ramlplugin.raml2code.plugin.SpringMvcEndpointGeneratorMojo.execute(SpringMvcEndpointGeneratorMojo.java:527)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
The text was updated successfully, but these errors were encountered:
Reusing this issue for a related question - but how do I go about using additional properties? I'm noticing that when I have a RAML object type with additionalProperties set to true, it gets generated as its own class, but that class does not have a reference to a map or other structure that would allow for setting of fields that are not predefined. I have tried this with the config <includeAdditionalProperties> set to true.
I have the following RAML, which defines a type where I want to restrict the type of any additional properties. This is valid RAML based on the 1.0 specification. It seems that the
//
field is treated as having an empty string value as a name which throws an index out of bounds exception during code generation (please also see the stack trace below).Any chance there's a known workaround?
The text was updated successfully, but these errors were encountered: