Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
anthony-c-martin opened this issue Jun 3, 2021 · 5 comments · Fixed by #3519
Closed

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

anthony-c-martin opened this issue Jun 3, 2021 · 5 comments · Fixed by #3519
Assignees
Labels
enhancement New feature or request
Projects
Milestone

Comments

@anthony-c-martin
Copy link
Member

anthony-c-martin commented Jun 3, 2021

To unblock resource creation in cases where swagger definitions are missing top-level resource properties (example: Azure/azure-rest-api-specs#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:

  • 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.

Related issues: #949, #2757

@anthony-c-martin anthony-c-martin added the enhancement New feature or request label Jun 3, 2021
@ghost ghost added the Needs: Triage 🔍 label Jun 3, 2021
@alex-frankel alex-frankel added this to the v0.5 milestone Jun 3, 2021
@alex-frankel
Copy link
Collaborator

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

@majastrz
Copy link
Member

majastrz commented Jun 3, 2021

  • 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
Copy link
Collaborator

miqm commented Jun 19, 2021

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

@anthony-c-martin
Copy link
Member Author

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
Copy link
Member

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

@stephaniezyen stephaniezyen moved this from In Review to Done in 0.5 release Jul 13, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
4 participants