Closed queertypes closed 5 years ago
Unfortunately, the params are not covered.
True... I have an idea on this one, though. If routes were specified using RFC 6570 URI Templates, we might be able to encode parameter requirements. This would take some redesign on Falcon. As a bonus, though, +1 for argument checking and +1 for automatic homedoc.
There's even an implementation of RFC 6570 on pypi - works with Python 2.5+ and Python 3.3.
If we do this, we should provide general affordances for generating a variety of API specs. I personally have mixed feelings about letting the code drive the spec, since that means the contract is fluid and prone to implementation errors, but this is something lots of people like to do, so should we support it anyway?
P.S. - I'm open to the idea of supporting the home document proposal out of the box, since it is IMO more in keeping with the spirit of REST than some of the alternatives. But it may be better to just afford this sort of thing and have add-ons in different projects for JSON Home, Swagger, etc.
The home doc RFC is stagnant since 2017, so I don't think we will take it further.
It would be pretty awesome if based on routes registered for a Falcon application, Falcon was able to automatically generate a home doc.
More or less like:
Depends on issue #35