{"id":24663878,"url":"https://github.com/fatmatto/express-ajv","last_synced_at":"2025-10-08T00:31:13.562Z","repository":{"id":49602563,"uuid":"127393696","full_name":"fatmatto/express-ajv","owner":"fatmatto","description":"Express middleware that helps validating user input with AJV library","archived":false,"fork":false,"pushed_at":"2024-06-17T07:15:45.000Z","size":229,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-15T14:06:04.327Z","etag":null,"topics":["ajv","api","express","express-ajv","json-schema","middleware","nodejs","validation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fatmatto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-30T07:01:27.000Z","updated_at":"2024-06-17T07:15:42.000Z","dependencies_parsed_at":"2023-01-24T19:03:14.798Z","dependency_job_id":null,"html_url":"https://github.com/fatmatto/express-ajv","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatmatto%2Fexpress-ajv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatmatto%2Fexpress-ajv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatmatto%2Fexpress-ajv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatmatto%2Fexpress-ajv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fatmatto","download_url":"https://codeload.github.com/fatmatto/express-ajv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235665642,"owners_count":19026236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajv","api","express","express-ajv","json-schema","middleware","nodejs","validation"],"created_at":"2025-01-26T05:17:19.458Z","updated_at":"2025-10-08T00:31:13.199Z","avatar_url":"https://github.com/fatmatto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/fatmatto/express-ajv.svg?branch=master)](https://travis-ci.org/fatmatto/express-ajv)\n\n# express-ajv\nExpress middleware that helps validating user input\n\n## What\nA simple middleware for your expressjs routes that accepts JSON schemas and uses AJV under the hood to validate request payload (querystring, body, headers and params)\n\n## Why\n* Express validator is good for websites imho, not complex apis\n* JSON schema is good and can model anything in your project, this is good for orgs where you have multiple services\n* AJV is fast and it just works\n\n## How?\n`npm i express-ajv-middleware`\n\n```javascript\nconst { validateRoute } = require('express-ajv-middleware')\n\n// setup your express app\n\nconst validatePostFoo = validateRoute({\n   body: {\n        type: 'object',\n        properties: {\n            'bar': { type: 'integer' },\n            'baz': { type: 'string' }\n        },\n        required: ['bar']\n   }\n})\n\napp.post('/foo', validatePostFoo, (req,res,next) =\u003e {\n    // Do your thing here\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatmatto%2Fexpress-ajv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffatmatto%2Fexpress-ajv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatmatto%2Fexpress-ajv/lists"}