pie-framework / pie-cli

the main pie-cli
ISC License
2 stars 2 forks source link

validate that a loaded config.json's elements match with the models elements #136

Open edeustace opened 7 years ago

edeustace commented 7 years ago

It is easy for a developer to forget to match up the elements in the elements map with the elements in the models. After loading the config, validate that all the elements match up and that there is no redundancy.

This is an invalid config because a is defined and not used, and b is refered to in the models but not declared.

{
  "elements" : {
    "a" : "a"
  },
  "models" : [
    {
      "element" : "b"
    }
  ]
}