Skip to content

Nullable response have a weird behavior right now  #356

Description

import "@typespec/http";

using TypeSpec.Http;

@error
model Error {
  message: string;
}

@route("/1") op read1(): string | null;
@route("/2") op read3(): string | null | Error;

Playground link

Resulting is a 204 no content before PR #355 which remove ignore null responses.

Feel like it should be making the string body nullable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design:neededA design request has been raised that needs a proposal

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions