Skip to content

Instantly share code, notes, and snippets.

@danzel
Created December 12, 2019 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danzel/ba3d7f905916772a96f9d0845085e071 to your computer and use it in GitHub Desktop.
Save danzel/ba3d7f905916772a96f9d0845085e071 to your computer and use it in GitHub Desktop.
{
"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