UNPKG

api-spec-converter

Version:

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

117 lines (116 loc) 2.56 kB
{ "definitions": { "Schema1": { "properties": { "prop1": { "type": "string", "x-deprecated": { "description": "Prop deprecation info" } }, "prop2": { "type": "string", "x-deprecated": { "description": "Prop also deprecated" } }, "prop3": { "type": "integer", "x-deprecated": false } }, "type": "object", "x-deprecated": true }, "Schema2": { "properties": { "prop4": { "type": "string", "x-deprecated": true }, "prop5": { "items": { "type": "string", "x-deprecated": true }, "type": "array" } }, "type": "object", "x-deprecated": { "replaced-by": "Schema1" } }, "Schema3": { "items": { "type": "string" }, "type": "array", "x-deprecated": false } }, "info": { "title": "API with deprecated schemas and operations\nSee https://github.com/Azure/autorest/tree/master/Samples/test/deprecated for description of x-deprecated as supported by Autorest", "version": "0.0.1" }, "paths": { "/path1": { "get": { "deprecated": true, "operationId": "getPath1", "parameters": [], "produces": [ "application/json" ], "responses": { "200": { "description": "Deprecated operation 1", "schema": { "$ref": "#/definitions/Schema1" } } } } }, "/path2": { "get": { "deprecated": true, "operationId": "getPath2", "parameters": [], "produces": [ "application/json" ], "responses": { "200": { "description": "Deprecated operation 2", "schema": { "$ref": "#/definitions/Schema2" } } }, "x-deprecated": { "description": "Deprecation info" } } }, "/path3": { "get": { "operationId": "getPath3", "parameters": [], "produces": [ "application/json" ], "responses": { "200": { "description": "Operation 3", "schema": { "$ref": "#/definitions/Schema3" } } } } } }, "swagger": "2.0", "x-components": {} }