Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.22k stars 747 forks source link

Relax missing top-level resource property validations to 'warning' #3000

Closed anthony-c-martin closed 3 years ago

anthony-c-martin commented 3 years ago

To unblock resource creation in cases where swagger definitions are missing top-level resource properties (example: https://github.com/Azure/azure-rest-api-specs/issues/11986), it would be worth relaxing the validation to 'warning' - similar to the validation we have for non-top-level resource properties.

Some things to be aware of:

Related issues: #949, #2757

alex-frankel commented 3 years ago

Given how difficult it has proven to get logicapps to fix their swagger, I think this should be prioritized early for 0.5

majastrz commented 3 years ago
  • Properties with semantic meaning to Bicep (name, parent, scope, dependsOn) should continue to error on type mismatch.
  • Properties outside of the known ARM top-level properties list should continue to raise errors if supplied.

100% agree on that.

miqm commented 3 years ago

I think I’ve a solution, can you assign this to me?

anthony-c-martin commented 3 years ago

I think I’ve a solution, can you assign this to me?

Absolutely! This is something we've discussed internally before, and we've got a few other future changes planned for the type system. It would be worth either writing up rough notes on your plan here before starting on the code, or discussing offline via Teams. Does that sound OK?

majastrz commented 3 years ago

This part of the experience with this change is really cool! If you see it, it's super obvious that you can just click it to report the problem. image