Remove manual json_decode in API endpoints
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 52
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 82
Description
In case the user wants to use endpoints where they have to send complex data they need to send it as the JSON body.
Allowing to send string data and then manually decoding it is unnecessary and leads to suboptimal OpenAPI specifications.
Removing that also allows typing the parameter as array which increases safety over manually checking it since the method would never be called if the input data didn't match.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the API endpoints that manually call json_decode and inspect their request parameter declarations and OpenAPI output. Remove the string-decoding path and verify that complex JSON bodies are typed as arrays and represented correctly in the generated specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100