Skip to content

[http-specs][bug] API doesn't follow runtime behavior #9173

@msyyc

Description

@msyyc

@scenarioDoc("""
Test bullet points in model and enum documentation.
Expected input:
```json
{
"prop": "Simple"
}
```
""")
@post
@route("/bullet-points/model")
op bulletPointsModel(input: BulletPointsModel): NoContentResponse;
doesn't follow runtime behavior of
Scenarios.Documentation_Lists_bulletPointsModel = createPostServerTests(
"/documentation/lists/bullet-points/model",
{
prop: "Simple",
},
);

The related file shall make the following 2 fixes

  1. change response type of op bulletPointsModel to OkResponse
  2. update expected request of op bulletPointsModel to
{
  "input": {"prop": "Simple"}
}

NOTE: please fix main.tsp and mockapi.ts at the same time.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglib:http-specsFor issues/prs related to the @typespec/http-specs package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions