eclipse / dirigible

Eclipse Dirigible™ Project
https://www.dirigible.io
Eclipse Public License 2.0
268 stars 85 forks source link

[Templates] Model template parameters, should have 'required' key #1761

Open StanZGenchev opened 2 years ago

StanZGenchev commented 2 years ago

Describe the bug When you try to generate from model templates, all parameters can be left empty because there is nothing telling us which parameters are required and which are not.

To Reproduce Steps to reproduce the behavior:

  1. Make a get request to '/services/v4/js/ide-template-service/api/templates.js'
  2. See issue:
    {
    "description":"Application with UI, REST APIs and DAOs",
    "extension":"model",
    "id":"template-application-ui-angular/template/template.js",
    "name":"Application - UI (AngularJS)",
    "parameters":[
      {
         "label":"Extension",
         "name":"extensionName",
         "placeholder":"Extension name"
      }
    ]
    }

Expected behavior 'required' should be added to parameters which are required:

{
   "description":"Application with UI, REST APIs and DAOs",
   "extension":"model",
   "id":"template-application-ui-angular/template/template.js",
   "name":"Application - UI (AngularJS)",
   "parameters":[
      {
         "label":"Extension",
         "required":true,
         "name":"extensionName",
         "placeholder":"Extension name"
      }
   ]
}

Desktop:

harshit-2004 commented 6 months ago

I want to work on this issue will you assign it to me.