Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
specs, compatibility for 0.56 (#577)
Browse files Browse the repository at this point in the history
* explicit body

* explicit statusCode
  • Loading branch information
weidongxu-microsoft authored May 8, 2024
1 parent 614aa62 commit e82e2b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/red-flies-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@azure-tools/cadl-ranch-specs": patch
---

Compatibility for 0.56 http lib
2 changes: 2 additions & 0 deletions packages/cadl-ranch-specs/http/client/naming/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ namespace Header {
""")
@get
op response(): {
@statusCode _: 204;

@clientName("clientName")
@header
`default-name`: string;
Expand Down
4 changes: 3 additions & 1 deletion packages/cadl-ranch-specs/http/type/model/empty/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ op putEmpty(@body input: EmptyInput): void;
@scenarioDoc("Send a GET request which returns the following body {}")
@route("/alone")
@get
op getEmpty(): EmptyOutput;
op getEmpty(): {
@body body: EmptyOutput;
};

@scenario
@scenarioDoc("Send a POST request with the following body {} which returns the same.")
Expand Down

0 comments on commit e82e2b2

Please sign in to comment.