flasgger/flasgger
Ver no GitHubHow does flasgger handle multiple URLs with flask-restful?
Open
#174 aberto em 28 de dez. de 2017
bughacktoberfesthelp wanted
Description
I'm using flask-restful and have a resource with two URLs, like this:
api.add_resource(Job, '/job/<int:job_id>', '/job')
where job_id is used only by the GET method.
In the resources code I have:
class Job(Resources):
def get(self, job_id):
"""
Retrieve a job from its ID
---
tags:
- Jobs
parameters:
- name: job_id
in: path
description: ID of the job
required: true
responses:
200:
description: Job found
404:
description: Job not found
"""
the expected result is a swagger spec with only one URL path for the GET operation, but flasgger generates a swwager spec with two URL paths for the GET one for /job/{job_id} and another one for /job.
Is it possible to separate specifications by path or method in this case?