Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring validation to json-schema #14

Merged
merged 11 commits into from
Aug 20, 2017
Merged

Refactoring validation to json-schema #14

merged 11 commits into from
Aug 20, 2017

Conversation

mrkvon
Copy link
Member

@mrkvon mrkvon commented Aug 3, 2017

The json-schema validation is generalized into a function returning an express middleware.

Refactoring POST /users/:username/tags and PATCH /users/:username/tags/:tagname.

TODO: The JSON API contains some duplicate data (id of a document in url and in body (i.e. usernames, tagnames, etc.)). We need to compare them to validate. Json-schema is weak/unable to do this. ajv library might be able to do it, or we do it independently.
There is also a proposition to include this ability to json-schema.

@mrkvon mrkvon requested a review from agatatalita August 3, 2017 11:30
@mrkvon mrkvon changed the title Refactoring some of the validation for json-schema Refactoring validation to json-schema. Removing express-validator based validation. Aug 20, 2017
@mrkvon mrkvon changed the title Refactoring validation to json-schema. Removing express-validator based validation. Refactoring validation to json-schema Aug 20, 2017
@mrkvon mrkvon merged commit 1eb8831 into master Aug 20, 2017
@mrkvon mrkvon deleted the json-schema branch August 20, 2017 08:03
@mrkvon mrkvon restored the json-schema branch August 20, 2017 08:51
@mrkvon mrkvon deleted the json-schema branch September 13, 2017 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant