Closed jaonoctus closed 7 years ago
@JaoNoctus Thanks for the suggestion! Very welcome.
@flyingluscas would you like to comment on this?
@JaoNoctus Thanks for the suggestion, at this moment we have a similar structure, except we dont have a status field, I didn't think it was needed because we are using the http status codes to know if there was any errors or not, that way we always have to use the right status codes when returning a response, but what do you think @vedovelli ?
@JaoNoctus @flyingluscas If we have something in place, I'd suggest leave it as it is. Specially because a package was suggested to implement the idea. Thanks guy, I'm closing this issue.
Would be nice if all of spa-starter-kit's REST API responses conform to the JSend Specification.
This means that every response will have a
status
and adata
field in the JSON response. Thestatus
field will give either asuccess
orfail
. In the case of asuccess
, the data will contain the requested data. In the case of afail
, the data will contain error messages.