cancel
Showing results for 
Search instead for 
Did you mean: 

Open API Spec 3.0 - how to specify Formparam & Body in parameters

SOLVED
Highlighted
Occasional Visitor

Open API Spec 3.0 - how to specify Formparam & Body in parameters

How we will specify our formdata parameter in the open API spec 3.0 document. Also why body parameter is removed and what is the alternative to do the below code snippet from swagger 2.0 in 3.0?

  1. parameters:
  2. - in: formData
  3. name: name
  4. type: string
  5. description: A person's name.
1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: Open API Spec 3.0 - how to specify Formparam & Body in parameters

In OpenAPI 3.0, "in: body" and "in: formData" parameters have been replaced with the "requestBody" keyword. Check out the examples here:

https://swagger.io/docs/specification/describing-request-body/


Helen Kosova
SmartBear Technical Writer
________________________
Join the annual community event and share your stories to win gifts
Wintertainment2019

View solution in original post

1 REPLY 1
Moderator

Re: Open API Spec 3.0 - how to specify Formparam & Body in parameters

In OpenAPI 3.0, "in: body" and "in: formData" parameters have been replaced with the "requestBody" keyword. Check out the examples here:

https://swagger.io/docs/specification/describing-request-body/


Helen Kosova
SmartBear Technical Writer
________________________
Join the annual community event and share your stories to win gifts
Wintertainment2019

View solution in original post