Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix duplicate @server definition #542

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading