Skip to content

The default behavior for request and response body content types is broken #2237

@mikekistler

Description

@mikekistler

The default behavior for content types is not working correctly, at least as far as what gets emitted by the openapi3 emitter.

The documented default behavior is:

op download(): bytes; // response content type is application/octet-stream
op upload(@body file: bytes): void; // request content type is application/octet-stream
op getContent(): string; // response content type is text/plain
op getPet(): {
  // response content type is application/json
  name: string;
};

But in the playground all these wind up being application/json:

Playground example

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentationneeds-area

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions