Skip to content
  • OpenAPI / Swagger · API Design

OpenAPI / Swagger

LearnViaNotes @learnvianotes· 1 min read

OpenAPI is the standard machine-readable contract for REST APIs. Write once — generate docs, SDKs, mock servers, and test suites automatically.

Minimal OpenAPI spec

openapi: "3.1.0"
info:
  title: Product API
  version: "1.0.0"

paths:
  /products/{id}:
    get:
      summary: Get a product by ID
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string }
      responses:
        "200": { description: Product found }
        "404": { description: Not found }

What you get from an OpenAPI spec

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report