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

Allow to describe parameters #403

Open
nichtich opened this issue Jun 19, 2023 · 3 comments
Open

Allow to describe parameters #403

nichtich opened this issue Jun 19, 2023 · 3 comments

Comments

@nichtich
Copy link

nichtich commented Jun 19, 2023

The description of parameters in Swagger is not very helpful, e.g.

A value of type string that will substitute ?_name in the original query

How about adding a decorator to give an optional description of parameters? So with

#+ parameters:
#+   name: name of the person

The description could be

name of the person (string)

@c-martinez
Copy link
Collaborator

Hi @nichtich !

Thanks for your suggestion. This would indeed be a good improvement.

I guess it would be nice if we could combine this with the defaults decorator.

#+ parameters:
#+   name: 
#+     description: name of the person
#+     default: "Bob"

Are there other properties that would be good to define for a parameter? Maybe enumerate as well?

@albertmeronyo what do you think?

@nichtich
Copy link
Author

Adding example values would also be helfpul.

@c-martinez
Copy link
Collaborator

We could have something like this:

#+ parameters:
#+   name: 
#+     description: name of the person
#+     default: "Bob"
#+     enumerate: ["Alice", "Bob", "Charles"]
#+     example: "Alice"

The only thing we need to decide is if this syntax is complementary or a replacement of the current syntax for enumerate and default decorators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants