microsoft / microsoft/typespec
validate content-type set as constant/required while @body or @bodyRoot value is optional?
Open
feature
lib:http
triaged:core
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
if the spec contains the following for an operation:
```
model Bar {
baz: string;
}
op foo(
@doc("Type of content")
@header("content-type")
contentType: "application/json; odata=minimalmetadata";
@doc("The body.")
@body
body?: Bar;
): void;
```
Do we allow content-type to be required if the body is not or should we validate this?
Contributor guide
Assessment
This issue has not been assessed yet.