Validation schemas

Registered by Dolph Mathews on 2014-08-14

The TC recently objected to the apparent complexity of the model objects in PyCADF. For example:

  https://github.com/openstack/pycadf/blob/5792c7a1f12c885292359dc2aae11e7afc2fad38/pycadf/geolocation.py

This is a lot of code to validate 7 attributes in a dict as nothing more than strings. All of the boilerplate can be eliminated in favor of defining a JSON Schema for the object, and we can have much more powerful validation -- assuming none of the boilerplate is considered public API (the tests seem to reach into it, but I don't know why end users would).

Blueprint information

Status:
Started
Approver:
None
Priority:
Low
Drafter:
Dolph Mathews
Direction:
Needs approval
Assignee:
Dolph Mathews
Definition:
Approved
Series goal:
None
Implementation:
Slow progress
Milestone target:
None
Started by
Dolph Mathews on 2014-08-15

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/validation-schemas,n,z

Addressed by: https://review.openstack.org/114356
    jsonschema based model validation

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.