Kinto / Kinto/kinto

id missing in the payload for the endpoint POST /accounts

Open
#2,982 7 comments 0 reactions 0 assignees View on GitHub
bug protocol stale
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
Screenshot 2022-04-15 at 2 07 07 PM

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.