diff --git a/.chronus/changes/fix-bulletpointsmodel-api-2025-12-12-07-23-18.md b/.chronus/changes/fix-bulletpointsmodel-api-2025-12-12-07-23-18.md new file mode 100644 index 00000000000..18d2a37a591 --- /dev/null +++ b/.chronus/changes/fix-bulletpointsmodel-api-2025-12-12-07-23-18.md @@ -0,0 +1,7 @@ +--- +changeKind: fix +packages: + - "@typespec/http-specs" +--- + +Fix bulletPointsModel API signature to match runtime behavior - changed response type to OkResponse and updated request body structure diff --git a/packages/http-specs/specs/documentation/main.tsp b/packages/http-specs/specs/documentation/main.tsp index 93808f9d1ba..14a3f6cd5ee 100644 --- a/packages/http-specs/specs/documentation/main.tsp +++ b/packages/http-specs/specs/documentation/main.tsp @@ -87,13 +87,13 @@ namespace Lists { Expected input: ```json { - "prop": "Simple" + "input": {"prop": "Simple"} } ``` """) @post @route("/bullet-points/model") - op bulletPointsModel(input: BulletPointsModel): NoContentResponse; + op bulletPointsModel(input: BulletPointsModel): OkResponse; /** * Steps to follow: diff --git a/packages/http-specs/specs/documentation/mockapi.ts b/packages/http-specs/specs/documentation/mockapi.ts index 446aac99f36..fee29a156cb 100644 --- a/packages/http-specs/specs/documentation/mockapi.ts +++ b/packages/http-specs/specs/documentation/mockapi.ts @@ -37,7 +37,9 @@ Scenarios.Documentation_Lists_bulletPointsOp = createGetServerTests( Scenarios.Documentation_Lists_bulletPointsModel = createPostServerTests( "/documentation/lists/bullet-points/model", { - prop: "Simple", + input: { + prop: "Simple", + }, }, );