py2swagger
py2swagger copied to clipboard
Doesn't work with falcon
This doesn't seem to work with falcon. It's missing most of my routes... only routes with a variable in them are showing up in the output.
May I please ask how you're launching the process with py2swagger? (i.e which command depending on your environment)
Here's my routes
app.add_route('/api/v1/healthcheck', HealthCheckResource())
app.add_route('/api/v1/resources', ResourceCollection())
app.add_route('/api/v1/resources/{id}', ResourceItem())
app.add_route('/api/v1/resources/{id}/children', ResourceChildren())
Run this:
py2swagger -o swagger.json falcon main:app
And the output only has this under paths:
"paths": {
"/api/v1/healthcheck": {
"get": {}
},
"/api/v1/resources/{id}/children": {
"get": {}
}
}
Did someone get the solutions?
@amitsharmaa8891 I created a falcon plugin for apispec that generates swagger docs
https://github.com/alysivji/falcon-apispec
@alysivji I just used your plugin for a new project and it’s working like a charm. Very nice. Your project deserves more attention.
Very glad to hear it's useful for others! Cheers to the apispec devs for doing most of the heavy lifting!
is it working with falcon v3 ?