beckn / BPP-Boilerplate-SDK

This is an open-source generic SDK that allows any beckn-enabled provider application to be built quickly
MIT License
0 stars 3 forks source link

Auto MongoDB model, Admin UI & Beckn Object Transformer #9

Open Sarfraz-droid opened 1 year ago

Sarfraz-droid commented 1 year ago

Fixes Issues : #8 #10 (Partially)

https://github.com/beckn/BPP-Boilerplate-SDK/assets/73013838/7dc50609-8bb3-4617-ab57-b8455c4b00bb

Configuration provided

path: <path_to_spec>
version: 1.1.0
db:
  mongo:
    mongo_uri: mongodb://localhost:27017
tables: 
  - name: "User_Catalog"
    for: Catalog
    admin_ui: true
    schema: 
      title:
        type: string
        as: descriptor.name
      description:
        type: string
        as: descriptor.short_desc
      category:
        type: enum
        enum: 
          - code: "1"
            name: "Category 1"
          - code: "2"
            name: "Category 2"
          - code: "3"
            name: "Category 3"
        as: descriptor.code
      images:
        type: object[]
        as: descriptor.images
        children:
          icon:
              type: upload
              as: url