flask-restx
flask-restx copied to clipboard
allow definition of own swagger schema for path variables.
Using custom converters to store the '__restx_schema__' dict. The dict updates the parameter for swagger.
Tested with (and without):
class DatabaseConverter(BaseConverter):
__restx_schema__ = {'type': 'string', 'enum': ['ProdDB','TestDB1','TestDB2']}
The result, was a dropdown menu instead of an input field.
Codecov Report
Merging #279 (d7e8c04) into master (c5b37e2) will decrease coverage by
0.14%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #279 +/- ##
==========================================
- Coverage 96.86% 96.72% -0.15%
==========================================
Files 19 19
Lines 2712 2716 +4
==========================================
Hits 2627 2627
- Misses 85 89 +4
Impacted Files | Coverage Δ | |
---|---|---|
flask_restx/swagger.py | 95.78% <0.00%> (-0.97%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update c5b37e2...9ba3e24. Read the comment docs.
few things:
- is there an issue associated with this change? i didn't see any discussion points around this anywhere
- What is the issue and what is this trying to address? What's the rationale for this change?
- There are no tests for this change. considering it's new functionality, for us to be able to include it, it'll need tests
I can't review this until the above three things are addressed.