StackStorm / StackStorm/st2

Utilize correct values for "type" attribute for API endpoint query param filters inside openapi.yaml

Open
#4,042 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Right now we mostly "abuse" type: string everywhere.

That's wrong and incorrect and removes a lot of value from something like OpenAPI file. Now the user / we need to introspect actual code to determine the parameter type.

We should fix that and specify correct types for all the query param filters instead of performing nasty transformations inside the API code.

That mostly applies to booleans, arrays and numbers.

Related PR #4041.

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

Review openapi.yaml and compare each query parameter filter with the API code that consumes it, focusing on booleans, arrays, and numbers. Use related PR #4041 for context. Done means all filter parameters declare their actual OpenAPI types instead of relying on type: string.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, python
Domain
api, backend-api-design
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.