Ge0rg3 / flask-parameter-validation

Get and validate all Flask input parameters with ease.
https://pypi.org/project/Flask-Parameter-Validation/
28 stars 12 forks source link

Self Documenting API Routes #14

Closed d3-steichman closed 1 year ago

d3-steichman commented 1 year ago

It is my opinion that this extension is well positioned to enable self-documenting API routes, and I have a Proof of Concept up on my fork of this repository - combined with docs.py (Flask Blueprint) and docs.html (Jinja2 Template) from SelfDoc.zip you should be able to see good results.

Usage:

@ValidateParameters(fn_list=a_global_list)
def route_function(
    param_name: type = Parameter(comment="Comment on Parameter")
):
    """Comment on Route"""
    pass

Let me know if this should be pursued further and polished up, or if you'd prefer to leave such functionality out.

Regards, Seth

Ge0rg3 commented 1 year ago

@d3-steichman sounds like a great plan, looking forward to seeing it 😊

d3-steichman commented 1 year ago

Opened #15 for development and further discussion, closing this issue :)