Designing API With Postman

API Development Environment  

Step1: Select API in postman and give api name for ex :Test Api

Step 2:Go to definition and  select Author From Scratch 

Use Schema :

openapi: 3.0.0

info:

  title: Cars API

  version: 1.0.0

paths:

  /cars:

    get:

      summary: Get a list of cars

      description: Retrieve a list of cars from the database.

      responses:

        '200':

          description: Successful response

          content:

            application/json:

              example:

                cars:

                  - id: 1

                    make: Toyota

                    model: Camry

                    year: 2022

                  - id: 2

                    make: Honda

                    model: Accord

                    year: 2022

openapi/swagger hub

Negative :

When you are making change to schema it is not getting updated in collection .

Comments

Popular posts from this blog

Unified Payments Interface (UPI) : Detail Analysis

Postman Automation with Newman

Postman Test Automation with Teamcity