StackStorm / StackStorm/st2

Provide validation api for model instances

Open
#4,182 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

SUMMARY

Initial context was in the use-case of using the client to create actions through the LiveAction model, but probably no reason not to implement generically for all models.

When using the client, an instance of a model is created, and then it is used in the action (create, get, etc) through the manager.

The manager makes the API calls to perform the action, which is the first time validation of the model instance seems to be performed.

It would be good to be able to validate the model instance prior to calling the create/update/get call, as that would allow user input validation prior to the API execution.

ISSUE TYPE
  • Feature Idea
STACKSTORM VERSION

st2 2.7.2, on Python 3.6

OS / ENVIRONMENT / INSTALL METHOD

Docker testing from pip install

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 where model-instance validation currently occurs during manager create, update, and get operations. Define the scope and behavior of a public validation API that can run before API execution, then verify it with coverage for generic models and the original LiveAction use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
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.