Skip to content

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

Description

@gupta-shrinath

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}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions