[Epic] [TypeSpec Authoring] scenario: authoring the API payload for API specification in typespec
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 144
Description
**Problem:**
When user write API specification in typespec, it is hard for user to figure out the API specification payload especially when the typespec code using Azure template. As a result, user may not be able to verify if the typespec API specification match his needs.
This feature aims to provide an authoring capability that can automatically generate API payload directly from TypeSpec code.
**Expected Behavior**
prompt: show the api payload for following typespec code:
```
model Widget{
name: string;
location: string;
tags?: Record;
}
interface Wedget {
createOrUpdateWidget is Operations.LongRunningResourceCreateOrUpdate;
}
```
**Expected output**
```
patch /widgets/{widgetName}
{
"name": "Widget",
"location": "eastus",
"tags": {
"env": "test"
}
}
```
Contributor guide
Research direction
Start with the TypeSpec model and interface example in the issue and determine where the authoring flow can accept that code. Done means the feature generates an API payload with the PATCH path, required fields, optional tags, and representative values shown in the expected output.
Written by the indexing model from the issue text.
Assessment
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100