marshmallow-code / marshmallow-code/apispec
Support for plugins to add multiple paths at once
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 202
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 3
Description
In #68 it shows the need for plugins to add multiple paths at one time.
I'm currently implementing a `Apispec.add_paths()` [function](https://github.com/tinproject/apispec/blob/add-multiple-paths/apispec/core.py#L204), but I don't feel this is the better way to do this.
I've thinking that allowing path helpers to return a list of Path objects, in addition to Path object, is better and easier. Perhaps refactor the code that add a Path object to the spec to an internal method and leave in `add_path()` the code to extract the Path objects and pass it to the internal method.
@sloria What do you think?
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 with apispec/core.py around the proposed Apispec.add_paths() implementation at line 204, then read the existing add_path() flow and the Path objects returned by path helpers. Review issue #68 for the motivating case. Done means plugins can add multiple paths while existing single-path behavior remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100