Skip to content

Commit

Permalink
fix duplicate @server definition (#542)
Browse files Browse the repository at this point in the history
* fix duplicate `@server` definition

* changelog
  • Loading branch information
tadelesh authored Mar 28, 2024
1 parent eb9e34f commit fb5ed08
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-beers-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@azure-tools/cadl-ranch-specs": patch
---

fix duplicate `@server` definition
3 changes: 2 additions & 1 deletion packages/cadl-ranch-specs/http/server/path/single/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "@azure-tools/cadl-ranch-expect";
using TypeSpec.Http;

@doc("Illustrates server with a single path parameter @server")
@scenarioService("/server/path/single")
@service
@server(
"{endpoint}",
"Testserver endpoint",
Expand All @@ -13,6 +13,7 @@ using TypeSpec.Http;
endpoint: url,
}
)
@route("/server/path/single")
namespace Server.Path.Single;

@scenario
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using TypeSpec.Http;
/**
* Illustrates not-versioned server.
*/
@scenarioService("/server/versions/not-versioned")
@service
@server(
"{endpoint}",
"Testserver endpoint",
Expand All @@ -17,6 +17,7 @@ using TypeSpec.Http;
endpoint: url,
}
)
@route("/server/versions/not-versioned")
namespace Server.Versions.NotVersioned;

@scenario
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ using TypeSpec.Versioning;
/**
* Illustrates versioned server.
*/
@scenarioService(
"/server/versions/versioned",
{
versioned: Versions,
}
)
@service
@versioned(Versions)
@server(
"{endpoint}",
"Testserver endpoint",
Expand All @@ -25,6 +21,7 @@ using TypeSpec.Versioning;
endpoint: url,
}
)
@route("/server/versions/versioned")
namespace Server.Versions.Versioned;

/**
Expand Down

0 comments on commit fb5ed08

Please sign in to comment.