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

User-defined types - Non-mandatory properties are visible as mandatory #10239

Closed
slavizh opened this issue Mar 28, 2023 · 3 comments · Fixed by #10242
Closed

User-defined types - Non-mandatory properties are visible as mandatory #10239

slavizh opened this issue Mar 28, 2023 · 3 comments · Fixed by #10242
Assignees
Labels
bug Something isn't working
Milestone

Comments

@slavizh
Copy link
Contributor

slavizh commented Mar 28, 2023

Bicep version
Bicep CLI version 0.15.31 (3ba6e06)

Describe the bug
Recently this change was released #9454 which changes the syntax and it is explained how it should be changed. When using intellisense now these properties are marked as mandatory.
image

image

To Reproduce
see above

Additional context
Add any other context about the problem here.

@ghost ghost added the Needs: Triage 🔍 label Mar 28, 2023
@slavizh
Copy link
Contributor Author

slavizh commented Mar 28, 2023

This also raises the question can you define property in type that is not mandatory but null is not allowed?

@jeskew
Copy link
Contributor

jeskew commented Mar 28, 2023

This is a bug; the (Required) annotation should only be appearing on non-nullable properties. This should be fixed with the next release.

This also raises the question can you define property in type that is not mandatory but null is not allowed?

No, this is not permitted. Erasing the distinction between missing and null properties was an explicit design goal per the discussion on #387.

@jeskew jeskew added bug Something isn't working story: type system vNext and removed Needs: Triage 🔍 labels Mar 28, 2023
@jeskew jeskew self-assigned this Mar 28, 2023
@jeskew jeskew added this to the v0.16 milestone Mar 28, 2023
@slavizh
Copy link
Contributor Author

slavizh commented Mar 29, 2023

ok, I guess it will be solved in the future.

@ghost ghost locked as resolved and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants