StackStorm / StackStorm/st2

Improve API validation so openapi.yaml file utilizes schemas from API model Python classes

Open
#3,575 1 comment 0 reactions 1 assignee View on GitHub

@Kami is already working on this.

Since Jul 17, 2017.

API enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.