Facing an issue when converting RAML to SpringBoot


#1

I am facing a problem, I have a raml file and I have to convert to spring java controller file.I added com.phoenixnap.oss pluging in pom file like this,

<plugin>
  <groupId>com.phoenixnap.oss</groupId>
  <artifactId>springmvc-raml-plugin</artifactId>
  <version>0.10.11</version>
  <configuration>
    <ramlPath>src/main/resources/api.raml</ramlPath>
	<outputRelativePath>target/generated-sources</outputRelativePath>
    <addTimestampFolder>false</addTimestampFolder>
    <basePackage>de.adorsys.ramlspringboot.api</basePackage>
    <baseUri>/api</baseUri>
    <generateUnreferencedSchemas>true</generateUnreferencedSchemas>
	<generationConfig>
		<includeAdditionalProperties>false</includeAdditionalProperties>
	</generationConfig>
	<seperateMethodsByContentType>false</seperateMethodsByContentType>
	<rule>com.phoenixnap.oss.ramlapisync.generation.rules.Spring4ControllerStubRule</rule>
	<ruleConfiguration>			
	</ruleConfiguration>
  </configuration>
  <executions>
    <execution>
      <id>generate-springmvc-endpoints</id>
      <phase>compile</phase>
      <goals>
        <goal>generate-springmvc-endpoints</goal>
      </goals>
    </execution>
  </executions>
</plugin>

when I am generating java controller file generating like this,

@RequestMapping(value = "/{id}", method = RequestMethod.GET)
public Todo getTodoById(
    @PathVariable(required = false)
    Long id) {
    return null; 
}

but @PathVariable(required = false) is getting error spring is not supporting required = false in @PathVariable.

Please advice me what should I do.


#2

Hi @saraawss I suggest you raise an issue on the springmvc-raml-plugin repository, the team is usually quite responsive.