You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import "@typespec/http";
using TypeSpec.Http;
@service({
title: "Widget Service",
version: "1.0.0",
})
namespace DemoService;
model Widget {
@visibility("read", "update")
@path
id: string;
weight: int32;
color: "red" | "blue";
}
model CreatedWidget extends Widget {
}
@route("/widgets")
@tag("Widgets")
interface Widgets {
// This works
// @route("create1")
// @post create1(widget: Widget): Widget;
// this doesn't (also the error is not the best)
// but if you have both of these, it works again
@route("create2")
@post create2(widget: Widget): CreatedWidget;
}
The text was updated successfully, but these errors were encountered:
Best described by example (playground
The text was updated successfully, but these errors were encountered: