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

fix(decorator): replace hard code url with {endpoint} in @scenarioService #598

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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/gold-horses-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@azure-tools/cadl-ranch-expect": patch
---

fix(decorator): replace hard code url with `{endpoint}` in `@scenarioService`
12 changes: 11 additions & 1 deletion packages/cadl-ranch-expect/src/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,16 @@ export function $scenarioService(
derivedModels: [],
projectionsByName: [],
} as any);
context.call($server, target, "http://localhost:3000", "TestServer endpoint");

context.call($server, target, "{endpoint}", "Test server endpoint", {
kind: "Model",
properties: new Map().set("endpoint", { name: "endpoint", type: { kind: "url" } }),
decorators: [],
projections: [],
name: "parameters",
derivedModels: [],
projectionsByName: [],
} as any);

context.call($route, target, route);
}
Loading