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

Comments for describing flow parameters #1047

Open
brig opened this issue Dec 4, 2024 · 0 comments
Open

Comments for describing flow parameters #1047

brig opened this issue Dec 4, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@brig
Copy link
Contributor

brig commented Dec 4, 2024

I want to revive this pull request. I think it might be useful :)

let's decide on the format of comments for describing parameters?
We can then implement comment parsers in the plugin, and the IDEA plugin will use them.

propose the following format:

##  
#  <FLOW_DESCRIPTION>  
#  in:  
#    myParam: <PARAM_TYPE>, mandatory|optional, <PARAM_DESCRIPTION>  
#  out:  
#    myParam: <PARAM_TYPE>, mandatory|optional, <PARAM_DESCRIPTION>  
## 

Where:

<FLOW_DESCRIPTION>: A description of the flow, optional parameter.

<PARAM_TYPE>:

  • Basic types: string | int | number | boolean | object | any
  • Arrays: string[] | int[] | number[] | boolean[] | object[] | any[]
    int === number, just an alias

<PARAM_DESCRIPTION>: A description of the parameter, optional parameter.

If you need to describe an object:

##  
#  in:  
#    objectParam: object, mandatory|optional, <PARAM_DESCRIPTION>  
#    objectParam.key1: <PARAM_TYPE>, mandatory|optional, <PARAM_DESCRIPTION>  
#    objectParam.key2: <PARAM_TYPE>, mandatory|optional, <PARAM_DESCRIPTION>  
##  

We can describe parameters with a JSON schema or by specifying name:, type:, required:, etc., but that makes each parameter take more than one line, so the description ends up longer than the flow itself. :)

@brig brig added the help wanted Extra attention is needed label Dec 4, 2024
@brig brig changed the title Comments for describing parameters Comments for describing flow parameters Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

1 participant