Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger creates every http method for each urls of resource #231

Open
gupta-shrinath opened this issue Mar 14, 2022 · 0 comments
Open

Swagger creates every http method for each urls of resource #231

gupta-shrinath opened this issue Mar 14, 2022 · 0 comments

Comments

@gupta-shrinath
Copy link

I have a resource 'Students' which should have a

  • GET method and url for that will have a path variable email
  • PATCH method and url for that will have a path variable id

App.py
api.add_resource(Students,api_version + '/student/<string:email>','/student/<string:id>')

Students Resource

class Students(MethodResource,Resource):

    @doc(description='Get student information',tags=['Student'])
    @marshal_with(StudentResponseSchema,code='200',description='Returns active student json') 
    def get(self,email,id=None):
		..
 
    @doc(description='Update student nick name and avatar url provided in request body',tags=['Student']) 
    @use_kwargs(UpdateStudentClassAvatarRequestSchema,location=('json'))
    @marshal_with(ResponseSchema,code='200')
    def patch(self,id,avatar_url,nick_name,email=None):
		..


My issue is Swagger is displaying both get and patch method for every url
Screenshot from 2022-03-12 08-48-52
Please ignore PATCH /v1/student/last_login/{id}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant