OpenAPI documentation for parameters #123
-
How do I associate descriptive text with parameters? E.g., if I have
how would I associate a description with |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @mdw00d, I create immediately an issue for this. I will include this one for the next release |
Beta Was this translation helpful? Give feedback.
-
Note for myself or potential contributors. It should be possible to specify parameter description explicitly using the For example, to support the following formats: def send_message(sender, recipient, message_body, priority=1):
'''
Send a message to a recipient
:param str sender: The person sending the message
:param str recipient: The recipient of the message
:param str message_body: The body of the message
:param priority: The priority of the message, can be a number 1-5
:type priority: integer or None
:return: the message id
:rtype: int
:raises ValueError: if the message_body exceeds 160 characters
:raises TypeError: if the message_body is not a basestring
''' And the numpy convention Parameters
----------
x : type
Description of parameter `x`.
y
Description of parameter `y` (with type not specified). |
Beta Was this translation helpful? Give feedback.
-
This has been implemented at #125, with basic support for several syntax styles. See https://github.com/Neoteroi/BlackSheep/blob/main/tests/test_openapi_docstrings.py for examples; I'll write documentation soon. |
Beta Was this translation helpful? Give feedback.
This has been implemented at #125, with basic support for several syntax styles. See https://github.com/Neoteroi/BlackSheep/blob/main/tests/test_openapi_docstrings.py for examples; I'll write documentation soon.