UNPKG

api-spec-converter

Version:

Convert API descriptions between popular formats such as OpenAPI(fka Swagger), RAML, API Blueprint, WADL, etc.

101 lines (100 loc) 2 kB
{ "components": { "schemas": { "comic": { "properties": { "alt": { "type": "string" }, "day": { "type": "string" }, "img": { "type": "string" }, "link": { "type": "string" }, "month": { "type": "string" }, "news": { "type": "string" }, "num": { "type": "number" }, "safe_title": { "type": "string" }, "title": { "type": "string" }, "transcript": { "type": "string" }, "year": { "type": "string" } }, "type": "object" } } }, "info": { "title": "XKCD", "version": "" }, "openapi": "3.0.0", "paths": { "/info.0.json": { "get": { "description": "Fetch current comic and metadata.\n", "responses": { "200": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/comic" } } }, "description": "OK" } } } }, "/{comicId}/info.0.json": { "get": { "description": "Fetch comics and metadata by comic id.\n", "parameters": [ { "in": "path", "name": "comicId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "*/*": { "schema": { "$ref": "#/components/schemas/comic" } } }, "description": "OK" } } } } }, "servers": [ { "url": "http://xkcd.com/" } ] }