-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Marshallers Disposed When Calling new RestBuilder() #34
Comments
The json response is coming from a controller with the following code def handleUserNotAuthenticated() {
response.status = HttpStatus.SC_UNAUTHORIZED
render createErrorViewModelFromException('User must be logged in.') as JSON
} The object generated ultimately has an enum like this enum MessageType {
CONFIRMATION,
ERROR,
INFORMATIONAL
} |
@graemerocher I added a test to the spec that illustrates this behavior and fails https://github.com/Grails-Plugin-Consortium/grails-rest-client-builder |
I think this is the same as https://jira.grails.org/browse/GRAILS-11801, which doesn't seem to have been migrated to a Github issue for some reason. |
When calling new RestBuilder from a controller, the custom json marshaling registered in the bootstrap are thrown disposed of and json marshalling returns to default state.
Bootstrap
Custom JSON Marshaler Registration
Controller Method
Json before calling controller method
Json after calling controller method
JVM: 1.7
Grails: 2.3.8
Plugin: 2.0.3
The text was updated successfully, but these errors were encountered: