StackStorm / StackStorm/st2

Autogenerate openapi.yaml.j2 from model code

Open
#3,788 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Currently st2common/st2common/openapi.yaml.j2 needs to be updated manually when a change is made to the API. This makes the update process error prone and potentially the openapi schema may not match the actual API implementation (see: https://github.com/StackStorm/st2/pull/3522, https://github.com/StackStorm/st2/issues/3783).

I'm proposing to autogenerate the openapi.yaml.j2 from source.

It would actually be great if the CLI, API and API documentation all were generated from a single "source of truth" to avoid errors and inconsistencies in the future.

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.

Research direction

Start with st2common/st2common/openapi.yaml.j2 and compare it with the model code and the API, CLI, and documentation sources mentioned in the issue. Review PR #3522 and issue #3783 for existing mismatch context; done means the schema is generated from a single source of truth and remains aligned with the implemented API.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, python
Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.