OpenAPI Specification Converter

Public

API Details

This API converts existing OpenAPI Specifications (OAS) to the latest OpenAPI 3.1.0 version. It takes an input OAS document in JSON or YAML format and transforms it into a compliant OAS 3.1.0 specification. The converter handles various versions of OAS, including 2.0 (Swagger) and 3.0.x, updating the structure, syntax, and features to align with the 3.1.0 standard. This service is essential for API developers and maintainers who want to leverage the latest capabilities of OpenAPI 3.1.0, such as improved JSON Schema support, enhanced security schemes, and more flexible parameter serialization.

Request Schema

PropertyTypeRequiredDescription
outputFormat
string
optionalThe desired output format for the converted specification.
Values:
json
yaml
specification
string
required
The original OpenAPI Specification document in JSON or YAML format.

Response Schema

PropertyTypeRequiredDescription
version
string
required
The version of the OpenAPI Specification to which the document was converted.
conversionNotes
string[]
optionalAny notes or warnings generated during the conversion process.
convertedSpecification
string
required
The converted OpenAPI 3.1.0 specification in the requested format (JSON or YAML).

API Metadata

ID656
Version
v1
Method
post
Endpoint

/openapi-specification-converter/v1

Tags
API Conversion
OpenAPI
Specification
Documentation

API Examples

Example Request
{
  "outputFormat": "json",
  "specification": "{ \"swagger\": \"2.0\", \"info\": { \"title\": \"Sample API\", \"version\": \"1.0.0\" }, \"paths\": { \"/users\": { \"get\": { \"summary\": \"List users\", \"responses\": { \"200\": { \"description\": \"Successful response\" } } } } } }"
}
Example Response
{
  "version": "3.1.0",
  "conversionNotes": [
    "Converted from Swagger 2.0 to OpenAPI 3.1.0",
    "Updated 'swagger' field to 'openapi'",
    "No schema changes were required for this simple specification"
  ],
  "convertedSpecification": "{ \"openapi\": \"3.1.0\", \"info\": { \"title\": \"Sample API\", \"version\": \"1.0.0\" }, \"paths\": { \"/users\": { \"get\": { \"summary\": \"List users\", \"responses\": { \"200\": { \"description\": \"Successful response\" } } } } } }"
}