{ "openapi": "3.0.0", "servers": [ { "url": "https://mermade.org.uk/api/v1" }, { "url": "http://mermade.org.uk/api/v1" } ], "info": { "title": "Swagger2OpenAPI Converter", "version": "1.0.0", "contact": { "name": "Mike Ralphson", "email": "mike.ralphson@gmail.com", "url": "https://github.com/mermade/swagger2openapi/issues" }, "license": { "name": "MIT", "url": "https://opensource.org/licenses/MIT" }, "description": "Converter and validator for Swagger 2.0 to OpenAPI 3.0.x definitions", "termsOfService": "https://opensource.org/licenses/MIT" }, "externalDocs": { "url": "https://github.com/mermade/openapi-webconverter" }, "security": [], "tags": [ { "name": "metadata", "description": "Metadata functions" }, { "name": "conversion", "description": "Conversion functions" }, { "name": "validation", "description": "Validation functions" } ], "paths": { "/status": { "get": { "summary": "Get the status of the API", "description": "", "tags": [ "metadata" ], "operationId": "getStatus", "responses": { "200": { "description": "default", "content": { "application/json": { "schema": {} }, "application/x-yaml": { "schema": {} } } } } } }, "/convert": { "get": { "summary": "Convert a Swagger 2.0 definition to OpenAPI 3.0.x from a URL", "description": "", "parameters": [ { "name": "url", "in": "query", "required": true, "description": "The URL to retrieve the OpenAPI 2.0 definition from", "example": "https://raw.githubusercontent.com/Mermade/openapi-webconverter/master/contract/swagger.json", "schema": { "type": "string", "format": "uri" } } ], "operationId": "convertUrl", "tags": [ "conversion" ], "responses": { "200": { "description": "default", "content": { "application/json": { "schema": {} }, "application/x-yaml": { "schema": {} } } } } }, "post": { "summary": "Convert a Swagger 2.0 definition passed in the body to OpenAPI 3.0.x ", "description": "", "operationId": "convert", "tags": [ "conversion" ], "responses": { "200": { "description": "default", "content": { "application/json": { "schema": {} }, "application/x-yaml": { "schema": {} } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": {} }, "application/x-yaml": { "schema": {} } } } }, "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "filename": { "description": "The file to upload and convert", "type": "string" }, "source": { "description": "The text of a Swagger 2.0 definition to convert", "type": "string" }, "validate": { "type": "string", "enum": [ "on" ] } } } } } } } }, "/validate": { "get": { "summary": "Validate an OpenAPI 3.0.x definition", "description": "", "parameters": [ { "name": "url", "in": "query", "required": true, "description": "The URL to retrieve the OpenAPI 3.0.x definition from", "example": "https://raw.githubusercontent.com/Mermade/openapi-webconverter/master/contract/openapi.json", "schema": { "type": "string", "format": "uri" } } ], "operationId": "validateUrl", "tags": [ "validation" ], "responses": { "200": { "description": "default", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/validationResult" } }, "application/x-yaml": { "schema": { "$ref": "#/components/schemas/validationResult" } } } } } }, "post": { "summary": "Validate an OpenAPI 3.0.x definition supplied in the body of the request", "description": "", "operationId": "validate", "tags": [ "validation" ], "responses": { "200": { "description": "default", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/validationResult" } }, "application/x-yaml": { "schema": { "$ref": "#/components/schemas/validationResult" } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": {} }, "application/x-yaml": { "schema": {} } } } }, "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "filename": { "description": "The file to upload and validate", "type": "string" }, "source": { "description": "The text of an OpenAPI 3.0.x definition to validate", "type": "string" } } } } } } } }, "/badge": { "get": { "summary": "Return a redirect to a badge svg file depending on a source definition's validity", "description": "", "parameters": [ { "name": "url", "in": "query", "required": true, "description": "The URL to retrieve the OpenAPI 3.0.x definition from", "example": "https://raw.githubusercontent.com/Mermade/openapi-webconverter/master/contract/openapi.json", "schema": { "type": "string", "format": "uri" } } ], "operationId": "getBadge", "tags": [ "validation" ], "responses": { "301": { "description": "Moved" } } } } }, "components": { "schemas": { "validationResult": { "type": "object", "properties": { "openapi": { "type": "string" } }, "required": [ "openapi" ] } } } }