mean-crud-generator
v1.0.0
Published
Mongoose, Express, Angular e Nodejs generator with OpenAPI3 that generates the frontend and JSONSchema to generate the backend
Downloads
3
Readme
mean-crud-generator
Mongoose, Express, Angular e Nodejs generator with OpenAPI3 that generates the frontend and JSONSchema to generate the backend
- Frontend: Create your Open API 3 schema using swagger
- Backend: Create a JSONSchema for your data (or Generate from Open API Schema
All the endpoints, docs, mongo schemas, express and Angular CRUD components ready to use!
Live Example
Base on this Open API Schema example and this JSON Schema example , it created the backend and docs:
- DOCUMENTATION: https://mean-crud-generator.herokuapp.com/docs/
- API: https://mean-crud-generator.herokuapp.com/api/pet/findByStatus?status=available
Run this project
Fork and clone to your computer, then do npm i
.
Run npm run dev
than you can see the demo project using the Pet Swagger example:
http://localhost:8080/docs
References
Links
- https://github.com/fliptoo/swagger-express
- https://github.com/swagger-api/swagger-node
Model
https://github.com/jon49/json-schema-to-mongoose
https://transform.tools/json-to-json-schema
https://www.npmjs.com/package/generate-schema
https://github.com/YousefED/typescript-json-schema
https://github.com/ramiel/mongoose-jsonschema-validation
https://github.com/topliceanu/mongoose-gen
https://jsonschema.net/
https://github.com/openapi-contrib/openapi-schema-to-json-schema
Repo example mongood jsonschem working:
- https://github.com/glitchdigital/structured-data-api/
Install
npm install -g swagger
TODO
- Frontend generation with Angular (in progress)
- Generate missing JSONSchemas based on the Open API
- Generate missing declarations in Open API Based on JSONSchemas
- Validation from data type based on OpenAPI Schema (help wanted)
- Special builtin datatype validation like credit cards, phones... (help wanted)
- Special builtin datatype with js-brasil for example (help wanted)
- Make JSONSchemas Editable in a Admin Section (help wanted)
- Make Open API Schemas editable in Admin Section (help wanted)
- Frontend generation with React (future)