Improve API validation so openapi.yaml file utilizes schemas from API model Python classes
@Kami is already working on this.
Since Jul 17, 2017.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
We need to improve / fix API validation so all the inputs are correctly validated based on the schema defined in openapi.yaml / API model.
Right now we have schemas from API models copy and pasted to openapi.yaml file and that's a maintenance nightmare (things will get out of sync, etc.).
We need to decide which place we want as an authoritative source (either API model Python classes or openapi.yaml file) and then write a generator which either writes schema to openapi.yaml file based on API model class definitions or vice-versa.
See https://github.com/StackStorm/st2/pull/3573#issuecomment-315697541 for context.
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.
Assessment
This issue has not been assessed yet.