Forum Discussion

mmaningol70's avatar
mmaningol70
New Member
3 years ago

What is the API structure for post request without parameters/body?

I have a post request without body parameters and I have written following swagger structure. But I am getting error so please someone help me to write swagger API structure for POST request without body parameters

 

post:
tags:
- Notification
responses:
204:
description: Update Seen Notification Success
401:
description: Access Token Missing/Expired
500:
description: Something went wrong!

1 Reply

  • Hi mmaningol70 

     

    Your structure looks fine, here is a minimal definition to complete it...

    openapi: 3.0.0
    info:
      title: Test API
      version: 1.0.0
    
    paths:
      /something:
        post:
          tags:
          - Notification
          responses:
            204:
              description: Update Seen Notification Success
            401:
              description: Access Token Missing/Expired
            500:
              description: Something went wrong!