0.3.6 • Published 2 months ago

very-express v0.3.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

VeryExpress

an generator that generate Express rest-api app based on jsonSchema and openApi

Idea

doing same things once is good,
twice is okay, third times is wasting life.

all you need is define the JsonSchema and openApi spec

Quick Start

  1. create JsonSchmea, can refer to output/jsonSchema put it as cli config file
  2. npm i -g very-express
    install package globally
  3. vex -h
    this cmd create the cli config file
  4. vex
    call cli with vex.config.json setting
  5. npm i
  6. npm build
  7. npm run start

JsonSchmea Setup

at the root of schema :

FieldsDescription
documentNamename of collection or table, also used at Model.
interfaceNameused at endpoint and naming Class, Interface, Files.
methodsavailable method of rest api.
"x-documentConfig": {
    "documentName": "user",
    "interfaceName": "User",
    "methods": [
        "get",
        "post",
        "put",
        "patch",
        "delete"
    ]
}

at the properites :

"userContact":{
    "type": "string",
    "format": "uuid",
    "required": false,
    "x-foreignKey": "usercontact"
}

Road Map

  • dockernize
  • generate express app
    • gen. openapi based on json schema
    • gen. controllers based on openapi
      • CRUD + Search api
  • database
    • mongodb
    • sql
    • db encrtption PDPA
  • oauth2
    • google
    • microsoft
    • github
  • Role Base Access Control

Enhancement To Do

  • Implement data encryption & hash (PDPA)
    • at JsonSchmea fields, add attribute x-dataSecure: "method" while accessing data, perform encryption based on method selected.
0.3.6

2 months ago

0.3.5

2 months ago

0.3.4

2 months ago

0.3.3

2 months ago

0.3.2

2 months ago

0.3.1

2 months ago

0.3.0

2 months ago

0.2.7

3 months ago

0.2.6

3 months ago

0.2.8

3 months ago

0.2.3

3 months ago

0.2.2

3 months ago

0.2.5

3 months ago

0.2.4

3 months ago

0.2.1

3 months ago

0.2.0

3 months ago

0.1.0

4 months ago

0.1.1

4 months ago

0.0.10

4 months ago

0.0.11

4 months ago

0.0.9

4 months ago

0.0.8

4 months ago

0.0.5

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago