Created
December 12, 2019 22:10
-
-
Save danzel/ba3d7f905916772a96f9d0845085e071 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.1", | |
"info": { | |
"title": "My API", | |
"version": "v1" | |
}, | |
"paths": { | |
"/Test": { | |
"get": { | |
"tags": [ | |
"Test" | |
], | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"text/plain": { | |
"schema": { | |
"$ref": "#/components/schemas/MyType" | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MyType" | |
} | |
}, | |
"text/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MyType" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"MyEnum": { | |
"enum": [ | |
"Value1", | |
"Value2" | |
], | |
"type": "string" | |
}, | |
"MyType": { | |
"required": [ | |
"stringy" | |
], | |
"type": "object", | |
"properties": { | |
"stringy": { | |
"type": "string" | |
}, | |
"integer": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"myEnumValue": { | |
"$ref": "#/components/schemas/MyEnum" | |
} | |
}, | |
"nullable": true | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment