victims / victims-web

The victims web application.
GNU Affero General Public License v3.0
8 stars 5 forks source link

Investigate the use of json-schema for validation #73

Closed gcmurphy closed 6 years ago

gcmurphy commented 11 years ago

JSON Schema describes your existing data format clear, human- and machine-readable documentation complete structural validation, useful for automated testing and validating client-submitted data.

http://json-schema.org/example2.html

Might be worth explicitly defining API message format using jsonschema.

abn commented 11 years ago

@gcmurphy the mongoengine models provide a decent bit of validation. But i can definitely see a use case where the client can pull schema information from the server, this way we get to push schema updates to clients etc, but this would also mean some rework on the client side.

Might use this issue for defining a schema from the models dynamically and then making it available via a rest call.

The second part would be to implement a 'client update' feature. This for java clients will be handled at https://github.com/victims/victims-lib-java/issues/18

Putting this in the future basket, hopefully the near one.

@ashcrow @dfj jfyi ^^

gcmurphy commented 6 years ago

Cleaning up my old issues. This is almost 5 years old. Think it is can be closed.