Releases: JamieCurnow/expree
v2.1.0
- Merge pull request #5 from JamieCurnow/chore/update-types 1542f2e
- clean up yarn lock - move to npm 606dc32
- update dependencies 66fd310
[Maybe breaking changes]
This shouldn't break anything and the API hasn't changed at all, but we have updated some packages and types which may stop your project from building downstream. Make sure you update express and any other types packages that are related in your project.
Also, check out this PR which you may need to wait on if you use @types/express at all:
DefinitelyTyped/DefinitelyTyped#63532
If you get an error passing your express app into the createRoutes() function, the suggestion is to typecast it as any or unknown until the above PR is merged in.
const app = express()
createReoutes(app as any, { // your options })Cleanup - remove log
exporting CreateRoutesOption type
- building locally a3b9ef7
Chore - exporting the CreateRoutesOption type
- exporting the CreateRoutesOption type 9e6a842
v2.0.0! Zod validation and Swagger docs 🥳🎊
#[Breaking changes]
We're now using Zod for validation instead of Joi. Joi is no longer supported - update your validation function to now return a Zod validation object for the body/params/etc.
validate: (zod) => ({
body: zod.object({ something: zod.boolean() })
})Swagger
See docs in README.
Commits
- update the tests 3c1d78d
- put version back to use auto versioning from np da9528c
- add to docs, update type descriptions, expose zod out of the swaggerZod function. 304a458
- Merge pull request #4 from JamieCurnow/2-implement-swagger-docs-object-using-swagger-zod 0e3043d
- Added openapi extended zod to the validate method Added examples to validate method Added route meta info to the swaggerZod function c0346ba
- Zod swagger docs now working 😎 New
swaggerZodmetod exposed to routes with the definition ready to register routes and schemas to 83e4faf - Merge pull request #3 from JamieCurnow/1-implement-zod-for-validation edf5169
- Implemented zod vaildation for routes Removed express-validation + joi packages a86b1c5
Contributors:
Version 1 stable [BREAKING CHANGES]
Started windows compatibility
Dynamic routes can now be defined by creating a file starting with an _ eg: /routes/user/_id.ts. Files starting with : still work for now.
Breaking change:
In previous versions, files starting with _ were ignored and not added to the express app as a route. From this version, these files will be added as dynamic routes.
Updates and minor bugfix
- updating express and fixing a bug with dynamic route priority c769060
v0.0.5
- fixing issue with different return types a248e50
v0.0.4
- removing logs 2e8d6db