marshmallow-code / marshmallow-code/apispec
Create methods to register all component objects
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 202
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 3
Description
Currently, definitions can be registered to be referenced to in the spec.
The spec allows to register other objects like parameters or responses.
OpenAPI 3: https://swagger.io/specification/#componentsObject
Some of them also exist in OpenAPI 2. Search for "Swagger Object" in https://swagger.io/specification/v2/.
We'd rather get this right with all those objects in mind rather than address them independently each time everyone needs one of them.
It should be easy to create methods to register each object type. Or should we create a single method and pass the type as argument (and deprecate `definition`)?
Then it's less obvious how to help the developer to use references. Referencing schema definition is automatic. Referencing responses probably wouldn't be, so the user would have to enter the reference response name. Ideally, we'd provide a function that at least takes care of the `$ref` syntax allowing the user to just enter the name of the ref.
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
Review the existing `definition` registration API, then compare the OpenAPI 3 Components Object and OpenAPI 2 Swagger Object references linked in the issue. Determine the intended registration and reference scope with maintainers; done means the supported component object types can be registered and referenced consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100