We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Original Reporter: sukrit007 Environment: Not Specified Version: 2.3 Migrated From: http://jira.grails.org/browse/GRAILS-10499
Given a domain object "Person" that is exposed as restful resource
{code:title=Person.groovy|borderStyle=solid} package com.meltmedia
import grails.rest.Resource;
@resource(uri='/api/persons', formats=['hal', 'json']) class Person {
String firstName String middleName String lastName String emailAddress static constraints = { firstName size:1..100 middleName size:1..100, nullable:true lastName size:1..100 emailAddress size:1..255, email:true }
} {code}
When I try to access the persons collection {noformat} curl -H "Accept: application/hal+json" http://localhost:8080/rest-demo/api/persons {noformat}
Then my output JSON is not well formed with missing "}" at the end of the response.
{noformat} { "_links": { "self": { "href": "http://localhost:8080/rest-demo/rest-demo/api/persons", "hreflang": "en", "type": "application/hal+json" } }, "_embedded": [ { "_links": { "self": { "href": "http://localhost:8080/rest-demo/api/persons/1", "hreflang": "en", "type": "application/hal+json" } }, "emailAddress": "sukritxxxx@uyyyyy.com", "firstName": "Sukrit", "lastName": "Khera" } ] {noformat}
Pull Request: #398
The text was updated successfully, but these errors were encountered:
graemerocher said: Thanks for the pull request!
Sorry, something went wrong.
graemerocher
No branches or pull requests
Original Reporter: sukrit007
Environment: Not Specified
Version: 2.3
Migrated From: http://jira.grails.org/browse/GRAILS-10499
Given a domain object "Person" that is exposed as restful resource
{code:title=Person.groovy|borderStyle=solid}
package com.meltmedia
import grails.rest.Resource;
@resource(uri='/api/persons', formats=['hal', 'json'])
class Person {
}
{code}
When I try to access the persons collection
{noformat}
curl -H "Accept: application/hal+json" http://localhost:8080/rest-demo/api/persons
{noformat}
Then my output JSON is not well formed with missing "}" at the end of the response.
{noformat}
{
"_links": {
"self": {
"href": "http://localhost:8080/rest-demo/rest-demo/api/persons",
"hreflang": "en",
"type": "application/hal+json"
}
},
"_embedded": [
{
"_links": {
"self": {
"href": "http://localhost:8080/rest-demo/api/persons/1",
"hreflang": "en",
"type": "application/hal+json"
}
},
"emailAddress": "sukritxxxx@uyyyyy.com",
"firstName": "Sukrit",
"lastName": "Khera"
}
]
{noformat}
Pull Request: #398
The text was updated successfully, but these errors were encountered: