sequelize-to-json-schemas
sequelize-to-json-schemas copied to clipboard
Convert Sequelize models into various JSON Schema variants (using the Strategy Pattern)
**Steps** - create a model like ``` const Model = sequelize.define('model', { someField: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, }, }); ``` - generate `OpenApi3Strategy` schema for this model ``` const...
I'm assuming this config option results in the use of `$id` for every property. This is considered not best pratice... it's not required either.
- drops support for nodejs v8, v10 and v12 - rendering `$id` field has become optional (preparing for compatibility with Json Schema Spec draft 2019-09) - bumps jest to v27
## After using this library, the docs have only model routes, authentication route is completely invisible. ````js app.configure(sequelize); // Configure other middleware (see `middleware/index.js`) app.configure(middleware); app.configure(authentication); app.configure(sequelizeToJsonSchemas as any); app.configure(...
Deploy `./docs/*` generated with `npm run docs` to github-pages