Closed JavaChr1s closed 6 years ago
Hi @JavaChr1s
Thanks for reaching us.
The problem is with your version of Spring - name
is valid attribute but it's introduced in 4.3.3. That's why it doesn't compile for you.
But since name
is just an alias for value
I guess we can switch to value
to keep compatibility with older Spring versions.
Hi @stojsavljevic ,
thanks for your response. That would be great. Can you make any estimation when this change will be available?
I guess somewhere next week.
My raml file generates the following controller method using your plugin:
@RequestMapping(value = "/{productId}", method = RequestMethod.GET) public ResponseEntity<Product> getProductById( @PathVariable(name = "productId") String productID) { return this.productControllerDelegate.getProductById(productID); }
Unfortunately the parameter of PathVariable is named value instead of name, so it should be
@RequestMapping(value = "/{productId}", method = RequestMethod.GET) public ResponseEntity<Product> getProductById( @PathVariable(value= "productId") String productID) { return this.productControllerDelegate.getProductById(productID); }
or even better@RequestMapping(value = "/{productId}", method = RequestMethod.GET) public ResponseEntity<Product> getProductById( @PathVariable("productId") String productID) { return this.productControllerDelegate.getProductById(productID); }
Otherwise it is not compilable.