keithwoodlock edited a comment on Dev Task MIFOSX-136

POST to https://localhost:8443/mifosng-provider/api/v1/journalentries with a valid empty JSON body "{}"

One of the main ideas is to make it easy for developers learn the api by using (we know alot wont read the api docs ) so when I hit the api with empty request body, would expect to get info back that missing all the mandatory fields for this type of api request

The result I got:

{
  "developerMessage": "The request was invalid. This typically will happen due to validation errors which are provided.",
  "developerDocLink": "https://github.com/keithwoodlock/mifosx/wiki/HTTP-API-Error-codes",
  "httpStatusCode": "400",
  "defaultUserMessage": "Validation errors exist.",
  "userMessageGlobalisationCode": "validation.msg.validation.errors.exist",
  "errors": [
    {
      "developerMessage": "The parameter entryDate cannot be blank.",
      "defaultUserMessage": "The parameter entryDate cannot be blank.",
      "userMessageGlobalisationCode": "validation.msg.GLJournalEntry.entryDate.cannot.be.blank",
      "parameterName": "entryDate",
      "value": null,
      "args": []
    },
    {
      "developerMessage": "The parameter officeId cannot be blank.",
      "defaultUserMessage": "The parameter officeId cannot be blank.",
      "userMessageGlobalisationCode": "validation.msg.GLJournalEntry.officeId.cannot.be.blank",
      "parameterName": "officeId",
      "value": null,
      "args": []
    }
  ]
}

I can see that officeId and entryDate are mandatory parameters, but so too are credits and debits but theres no validation check to see if they are passed/empty in the api request in GLJournalEntryCommandValidator.java

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to