Ask a Question

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

mmaningol70
New Member

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 1
ponelat
Staff

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

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!

 

cancel
Showing results for 
Search instead for 
Did you mean: