Questions tagged [grails-rest-api]

9 questions
0
votes
0 answers

Grails 5 RestfulController extension is showing default constructor missing problem

I am using grails-5.2.5 to migrate an application from grails-2.5.2 version. In grails-2 version there is a class RestVehicleTrackingController which extends RestfulController. The purpose of the class is to return Map object as JSON. No related…
Sumon Bappi
  • 1,937
  • 8
  • 38
  • 82
0
votes
1 answer

Property of class cannot be null error when making curl POST request to REST api in Grails 4

I created a new Grails 4.0.10 app using rest application profile. I would like to check how the Resource annotation works. According to the docs, if I annotate Resource on domain then I don't need to write a controller. The domain I have is: package…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
0
votes
0 answers

Grails Rest: Specify which GSON file to respond with on any action called

I am trying to create REST web service with grails 5.1.7. Have checked the documentation for Grails REST on its official site and followed the steps to create services. Currently got a situation where a webflow kind of feature needs to be performed,…
Parth Bhagat
  • 509
  • 1
  • 11
  • 24
0
votes
0 answers

Grails nested URL mappings yields to null

I am trying make use of the nested URL as documented in the RestFul URLs section It seems that the nested resource is not receiving a reference to the object the url is deriving from. URLmapping: "/books"(resources: 'book') { …
Al-Punk
  • 3,531
  • 6
  • 38
  • 56
0
votes
0 answers

How to filter the rejectedValue property when responding errors on Grails?

I'm using a command object to perform the data binding on a Grails restfull controller like in the example above: class BookController { // ... def save(BookCommand command) { if(command.hasErrors()) { respond…
ylima
  • 410
  • 5
  • 17
0
votes
1 answer

Grails Controller integration test executes actions of the parent, RestfulController class

I have a weird problem with integration testing restful controllers... In the following code snippet, when I make a post request from tests, the save method of the parent, RestfulController class is called instead of the save method of the child…
Pila
  • 5,460
  • 1
  • 19
  • 30
0
votes
1 answer

How do I prevent child properties from being updated?

When I use RestfulController in Grails to save data for an object, how can I prevent the client from applying changes to a related child object? Given the following domain classes: class Language { String name } class TranslationText { …
RMorrisey
  • 7,637
  • 9
  • 53
  • 71
0
votes
1 answer

Secured users created in grails integration test are unauthorized but bootstrapped ones are

I'm using Grails Spring Security Core and the Grails Spring Security REST plugin and I'm just starting to get things set up. I initialized the plugins with a User class and an Authority class (defaults) and went to write an integration test,…
Joshua S.
  • 133
  • 9
0
votes
3 answers

Grails: Exception with RestBuilder only while running in production tomcat server

I created the war file and deployed into tomcat server but while submitting the registration page(having recaptcha) this error is happening, but not in the local machine and app running in the local machine using the GGTS IDE. Following is the error…
Ragesh ck
  • 31
  • 8