Skip to content

validate content-type set as constant/required while @body or @bodyRoot value is optional? #11413

Description

@l0lawrence

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?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions