[Bug 1583507] [NEW] [api] Validating a payload against /api/schemas

Public bug reported:

When sending a "to be created" object (without an id property) to be
validated the schemas endpoint returns an error report with E4000 saying
the "id" property is required.

I expect the id to be created on POST and therefore not to be required
when validating a payload.

To reproduce send the following payload to /api/schemas/validationRuleGroup

{"code":"CHP","validationRules":[{"id":"UGR3QXRZZGL"},{"id":"rdZFSe8Ay0r"},{"id":"y9hiqDecYJX"}],"description":"Hello","name":"CHP"}

Note: The behaviour was introduced in trunk, as sending payloads with
id's works in 2.23.

** Affects: dhis2
     Importance: Undecided
         Status: New

** Tags: api

** Tags added: api

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1583507

Title:
  [api] Validating a payload against /api/schemas

Status in DHIS:
  New

Bug description:
  When sending a "to be created" object (without an id property) to be
  validated the schemas endpoint returns an error report with E4000
  saying the "id" property is required.

  I expect the id to be created on POST and therefore not to be required
  when validating a payload.

  To reproduce send the following payload to /api/schemas/validationRuleGroup

  {"code":"CHP","validationRules":[{"id":"UGR3QXRZZGL"},{"id":"rdZFSe8Ay0r"},{"id":"y9hiqDecYJX"}],"description":"Hello","name":"CHP"}

  Note: The behaviour was introduced in trunk, as sending payloads with
  id's works in 2.23.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1583507/+subscriptions

** Changed in: dhis2
   Importance: Undecided => High

** Changed in: dhis2
    Milestone: None => 2.24

** Changed in: dhis2
       Status: New => Confirmed

** Changed in: dhis2
     Assignee: (unassigned) => Morten Olav Hansen (mortenoh)

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1583507

Title:
  [api] Validating a payload against /api/schemas

Status in DHIS:
  Confirmed

Bug description:
  When sending a "to be created" object (without an id property) to be
  validated the schemas endpoint returns an error report with E4000
  saying the "id" property is required.

  I expect the id to be created on POST and therefore not to be required
  when validating a payload.

  To reproduce send the following payload to /api/schemas/validationRuleGroup

  {"code":"CHP","validationRules":[{"id":"UGR3QXRZZGL"},{"id":"rdZFSe8Ay0r"},{"id":"y9hiqDecYJX"}],"description":"Hello","name":"CHP"}

  Note: The behaviour was introduced in trunk, as sending payloads with
  id's works in 2.23.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1583507/+subscriptions

Fixed now in trunk, the @Property annotation now allows to override
required settings from the HBM files.

** Changed in: dhis2
       Status: Confirmed => Fix Committed

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1583507

Title:
  [api] Validating a payload against /api/schemas

Status in DHIS:
  Fix Committed

Bug description:
  When sending a "to be created" object (without an id property) to be
  validated the schemas endpoint returns an error report with E4000
  saying the "id" property is required.

  I expect the id to be created on POST and therefore not to be required
  when validating a payload.

  To reproduce send the following payload to /api/schemas/validationRuleGroup

  {"code":"CHP","validationRules":[{"id":"UGR3QXRZZGL"},{"id":"rdZFSe8Ay0r"},{"id":"y9hiqDecYJX"}],"description":"Hello","name":"CHP"}

  Note: The behaviour was introduced in trunk, as sending payloads with
  id's works in 2.23.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1583507/+subscriptions

Great! Thanks Morten

···

On Fri, May 20, 2016 at 4:21 AM, Morten Olav Hansen < 1583507@bugs.launchpad.net> wrote:

Fixed now in trunk, the @Property annotation now allows to override
required settings from the HBM files.

** Changed in: dhis2
       Status: Confirmed => Fix Committed

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1583507

Title:
  [api] Validating a payload against /api/schemas

Status in DHIS:
  Fix Committed

Bug description:
  When sending a "to be created" object (without an id property) to be
  validated the schemas endpoint returns an error report with E4000
  saying the "id" property is required.

  I expect the id to be created on POST and therefore not to be required
  when validating a payload.

  To reproduce send the following payload to
/api/schemas/validationRuleGroup

{"code":"CHP","validationRules":[{"id":"UGR3QXRZZGL"},{"id":"rdZFSe8Ay0r"},{"id":"y9hiqDecYJX"}],"description":"Hello","name":"CHP"}

  Note: The behaviour was introduced in trunk, as sending payloads with
  id's works in 2.23.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1583507/+subscriptions

--
Regards,

Mark Polak
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org <https://www.dhis2.org/>
mark@dhis2.org

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1583507

Title:
  [api] Validating a payload against /api/schemas

Status in DHIS:
  Fix Committed

Bug description:
  When sending a "to be created" object (without an id property) to be
  validated the schemas endpoint returns an error report with E4000
  saying the "id" property is required.

  I expect the id to be created on POST and therefore not to be required
  when validating a payload.

  To reproduce send the following payload to /api/schemas/validationRuleGroup

  {"code":"CHP","validationRules":[{"id":"UGR3QXRZZGL"},{"id":"rdZFSe8Ay0r"},{"id":"y9hiqDecYJX"}],"description":"Hello","name":"CHP"}

  Note: The behaviour was introduced in trunk, as sending payloads with
  id's works in 2.23.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1583507/+subscriptions