Skip to content

[Feature]: Support for OpenAPI Spec 3.2 #2248

@caochenlei

Description

@caochenlei

Feature Description

Add support for parsing and validating OpenAPI Specification 3.2.0. This update addresses the gap in current swagger-parser capabilities where only older OpenAPI versions are supported, preventing users from leveraging the latest specification features and improvements.

Use Case

  1. Modern API Development: Teams adopting OpenAPI 3.2.0 for new API specifications cannot use swagger-parser for validation, documentation generation, or code generation workflows
  2. Migration Projects: Organizations upgrading from older OpenAPI versions (3.0.x, 3.1.x) to 3.2.0 need tooling support to validate their migrated specifications
  3. CI/CD Pipelines: Automated API validation in deployment pipelines fails when encountering OpenAPI 3.2.0 specs, breaking development workflows
  4. Toolchain Integration: Downstream tools that rely on swagger-parser (documentation generators, mock servers, client SDK generators) cannot process 3.2.0 specs

Suggested Solution (optional)

  1. Schema Updates: Update the internal schema definitions to support OpenAPI 3.2.0 structure and validation rules
  2. Version Detection: Enhance version parsing to recognize 3.2.0 in the openapi field
  3. Backward Compatibility: Maintain support for existing OpenAPI versions while adding 3.2.0 capabilities
  4. New Feature Support: Implement support for 3.2.0 specific features such as:
    • Updated JSON Schema dialect (2020-12)
    • New webhook object support
    • Enhanced security scheme features

Alternatives Considered

Additional Context

Checklist

  • I have searched the existing issues to ensure this is not a duplicate.
  • This feature would be useful to more than just my use case.
  • I have provided enough detail for the maintainers to understand the scope of the request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions