StackStorm / StackStorm/st2

Router code doesn't perform any JSON schema validation on the query parameters

Open
#4,282 0 comments 0 reactions 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

Our openapi.yaml file allows us to define JSON schema definition for each API query parameter, yet right now we only use the default attribute and ignore anything else from the query parameter schema.

This means we don't perform any additional validation on query parameters which is bad (we ignore enum stuff, array type, etc.).

Since we support full JSON schema definition for each query parameter defined in the OpenAPI yaml file, we should also handle those parameters as such and perform full JSON schema validation on the query parameters.

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 by tracing the router's query-parameter handling and how schemas from openapi.yaml are read; the issue gives no specific source file or test entry point. Determine how the existing default handling can be extended, then verify that enum, array type, and other JSON Schema constraints are enforced for query parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.