• Pricing
  • Blog
Sign InGet Started
Free Tool

Swagger 2 → OpenAPI 3 (2026)

Migrate your Swagger 2.0 spec to OpenAPI 3.0.3 in one click. Handles host/basePath → servers, body params → requestBody, definitions → components.schemas, and securityDefinitions → securitySchemes.

Swagger 2.0→OpenAPI 3.0
openapi: 3.0.3
info:
  title: Pet Store
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /pets:
    get:
      operationId: listPets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pet'
      parameters: []
    post:
      operationId: createPet
      parameters: []
      responses:
        '201':
          description: Created
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pet'
components:
  schemas:
    Pet:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
        name:
          type: string

What changes between Swagger 2 and OpenAPI 3

  • host, basePath, schemes → servers: [{ url }]
  • parameters: [in: body] → requestBody
  • parameters: [in: formData] → requestBody with multipart/form-data
  • definitions → components.schemas
  • securityDefinitions → components.securitySchemes
  • $ref: #/definitions/X → $ref: #/components/schemas/X
  • consumes/produces become explicit per-operation content types
  • Non-body parameters get a schema wrapper instead of type at the top level

After migration

  1. Run the OpenAPI Validator to confirm the output is structurally valid.
  2. Run the OpenAPI Linter to catch new documentation-quality issues (operationIds, descriptions, error responses).
  3. Manually review any OAuth2 security schemes — they need flow-by-flow updates.
  4. Test SDK generation with your generator of choice (openapi-generator, openapi-typescript) — the v3 output is the modern target for all of them.
  5. Update your CI to validate against OpenAPI 3 schemas going forward.

When the converter is enough vs not

For most Swagger 2.0 specs (CRUD APIs, common auth patterns), the converter produces a working OpenAPI 3 document in one click. For specs with heavy custom extensions, complex OAuth flows, or deep nested parameter shapes, manually review the output. The converter is the 95% — the last 5% is engineering.

Ship API docs that stay this clean

Specway turns your OpenAPI spec into a branded developer portal — auto-synced, searchable, with built-in playground and code samples in every language. Free tier available.

Related tools

OpenAPI Validator
Validate the migrated spec.
OpenAPI Linter
Check the migrated spec for quality issues.
OpenAPI Viewer
Browse the migrated spec.
OpenAPI → TypeScript
Generate TS types from the migrated spec.

Frequently asked questions

Beautiful API documentation that developers love.

Features

  • AI-Generated Docs
  • Interactive Playground
  • Auto-Sync
  • AI Chatbot
  • Breaking Changes
  • Code Samples
  • Custom Branding
  • Analytics

Compare

  • vs ReadMe
  • vs Swagger UI
  • vs Mintlify
  • vs Postman
  • vs Scalar

Ecosystem

  • Workflows
  • Forms
  • Marketplace
  • Integrations
  • MCP Servers
  • Digital Rooms
  • Product OS

Free Tools

  • JSON Formatter
  • JSON Validator
  • JWT Decoder
  • OpenAPI Validator
  • cURL → Code
  • YAML ↔ JSON
  • All free tools →

Resources

  • Free Developer Tools
  • Blog
  • Guides
  • API Glossary
  • Help Center
  • Support

© 2026 Modlific. All rights reserved.

Privacy PolicyTerms of Service
  • Pricing
  • Blog
Sign InGet Started
Free Tool

Swagger 2 → OpenAPI 3 (2026)

Migrate your Swagger 2.0 spec to OpenAPI 3.0.3 in one click. Handles host/basePath → servers, body params → requestBody, definitions → components.schemas, and securityDefinitions → securitySchemes.

Swagger 2.0→OpenAPI 3.0
openapi: 3.0.3
info:
  title: Pet Store
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /pets:
    get:
      operationId: listPets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pet'
      parameters: []
    post:
      operationId: createPet
      parameters: []
      responses:
        '201':
          description: Created
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pet'
components:
  schemas:
    Pet:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
        name:
          type: string

What changes between Swagger 2 and OpenAPI 3

  • host, basePath, schemes → servers: [{ url }]
  • parameters: [in: body] → requestBody
  • parameters: [in: formData] → requestBody with multipart/form-data
  • definitions → components.schemas
  • securityDefinitions → components.securitySchemes
  • $ref: #/definitions/X → $ref: #/components/schemas/X
  • consumes/produces become explicit per-operation content types
  • Non-body parameters get a schema wrapper instead of type at the top level

After migration

  1. Run the OpenAPI Validator to confirm the output is structurally valid.
  2. Run the OpenAPI Linter to catch new documentation-quality issues (operationIds, descriptions, error responses).
  3. Manually review any OAuth2 security schemes — they need flow-by-flow updates.
  4. Test SDK generation with your generator of choice (openapi-generator, openapi-typescript) — the v3 output is the modern target for all of them.
  5. Update your CI to validate against OpenAPI 3 schemas going forward.

When the converter is enough vs not

For most Swagger 2.0 specs (CRUD APIs, common auth patterns), the converter produces a working OpenAPI 3 document in one click. For specs with heavy custom extensions, complex OAuth flows, or deep nested parameter shapes, manually review the output. The converter is the 95% — the last 5% is engineering.

Ship API docs that stay this clean

Specway turns your OpenAPI spec into a branded developer portal — auto-synced, searchable, with built-in playground and code samples in every language. Free tier available.

Related tools

OpenAPI Validator
Validate the migrated spec.
OpenAPI Linter
Check the migrated spec for quality issues.
OpenAPI Viewer
Browse the migrated spec.
OpenAPI → TypeScript
Generate TS types from the migrated spec.

Frequently asked questions

Beautiful API documentation that developers love.

Features

  • AI-Generated Docs
  • Interactive Playground
  • Auto-Sync
  • AI Chatbot
  • Breaking Changes
  • Code Samples
  • Custom Branding
  • Analytics

Compare

  • vs ReadMe
  • vs Swagger UI
  • vs Mintlify
  • vs Postman
  • vs Scalar

Ecosystem

  • Workflows
  • Forms
  • Marketplace
  • Integrations
  • MCP Servers
  • Digital Rooms
  • Product OS

Free Tools

  • JSON Formatter
  • JSON Validator
  • JWT Decoder
  • OpenAPI Validator
  • cURL → Code
  • YAML ↔ JSON
  • All free tools →

Resources

  • Free Developer Tools
  • Blog
  • Guides
  • API Glossary
  • Help Center
  • Support

© 2026 Modlific. All rights reserved.

Privacy PolicyTerms of Service