id missing in the payload for the endpoint POST /accounts
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 437
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 15
Description
In the response for GET /\__api\__,
for the endpoint POST /accounts, the ObjectSchema( body) is

Using this body gives the following error,
```
{
"code": 400,
"errno": 107,
"error": "Invalid parameters",
"message": "data.id in body: Required",
"details": [
{
"location": "body",
"name": "data.id",
"description": "data.id in body: Required"
}
]
}
```
The "id" field is missing in the body of the endpoint POST /accounts in the OpenAPI Spec.
Correct payload should be,
```
{
"data": {
"password": "string",
"id": "username",
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"permissions": {
"read": [
"string"
],
"write": [
"string"
]
}
}
```
Contributor guide
Research direction
Start by locating the OpenAPI schema or endpoint definition for POST /accounts and compare its request body with the validation error and payload shown here. Update the documented data object so the required id field is represented, then verify that the generated specification and example payload agree with the endpoint’s validation behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100