Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for variable system #26

Open
4 of 8 tasks
0hsn opened this issue Feb 5, 2022 · 2 comments
Open
4 of 8 tasks

support for variable system #26

0hsn opened this issue Feb 5, 2022 · 2 comments
Labels
epic Story collection

Comments

@0hsn
Copy link
Member

0hsn commented Feb 5, 2022

What

  • define local variables
  • define global variables
  • expose scoped function data to local variable
  • expose scoped function data to global variable
    • Specify expose / output variable on request
dump: :stdout '{.summary}\r\n{.headers}\r\n{.body}'
dump: :write(file:///home/user/file.txt) '{.summary}\r\n{.headers}\r\n{.body}'
  • inject named parameters to specs
    • define argument
    • define option
  • import variables to scope
  • ability to read ENV vars on specs
  • variable behavior modification with @annotation(...params) or [:annotation ...params]

Thoughts:

all variable gets name mangled on runtime
special keywords:
    _import_ ( array ) = list of files to be imported to current space. : can be used on variable specification format
        some/path/here/FileName => {FileName.VarName} : to import by absolute path, in-term of from where the commands get run
        ENV => {ENV.SHELL}  : import env variable
        SYSTEM => {SYSTEM.OS_VERSION} : import env variable
    _inject_ (string) = name of the variable, to be injected, not all component is injectable
    variable (object): list of all var in local scope : can be used on http, spec, flow etc
    new version type default:variable:...
Incremental update for variable features
    http: define variable and use in request
    http: define variable and use in description
    http: define variable and use in output/expose
        expose are 2 type
            calling from CLI
            calling from other spec
    ::import incrementally in spec files #issue
@0hsn 0hsn added the epic Story collection label Feb 5, 2022
@0hsn
Copy link
Member Author

0hsn commented Feb 13, 2022

Specify expose / output variable on request

What

---
request:
  ...
  expose:
    [tbd]

Why

it is needed for

  • --expose= option
  • output parsing
  • general output formatting

@0hsn
Copy link
Member Author

0hsn commented Mar 28, 2022

Value validation for variables

In describe section variables need sanity check

  • type hint
  • type check
  • value validation

@0hsn 0hsn pinned this issue Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Story collection
Projects
Status: No status
Development

No branches or pull requests

1 participant