microsoft / microsoft/typespec
Should typespec error if a model used for merge patch includes a nullable property
Open
triaged:core
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
In the below scenario since the model is used for merge patch it should include null in the possible range of values for any of its properties.
```
model Foo {
name?: string
description?: string | null
}
op Update(@header content-type: "application/merge-patch+json", ...Foo) : void
```
Contributor guide
Assessment
This issue has not been assessed yet.