Forum Discussion

rishi_0201's avatar
rishi_0201
New Contributor
5 years ago

Is there a way to remove the default code(200 OK) For POST and DELETE

Hi All,

 

Is there a way to remove the default code(200 OK) For POST and DELETE.

I would like to configure swagger API to display "Response Class (Status 201)" instead of "Response Class (Status 200)

 

Thanks!

    • rishi_0201's avatar
      rishi_0201
      New Contributor

      let me add my scenario here - In my cases a POST endpoint is used to perform an action which means it may return a 201 instead of a 200. However by default the swagger configuration adds a 200 for every POST call.

       

      • alex-savage's avatar
        alex-savage
        Occasional Contributor

        Can you share your API definition or a URL please and Ill take a look if that helps?