Skip to content

Instantly share code, notes, and snippets.

@wpatter6
Created September 5, 2019 17:35
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 wpatter6/dfe34db36300258fbabf7cbf102a0fff to your computer and use it in GitHub Desktop.
Save wpatter6/dfe34db36300258fbabf7cbf102a0fff to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.1",
"info": {
"title": "Api.Fake",
"version": "12345"
},
"servers": [
{
"url": "https://fake-url.com"
}
],
"paths": {
"/path/fake-request-1": {
"post": {
"tags": ["path/fake-request-1"],
"summary": "Fake Request",
"operationId": "postFakeRequest",
"parameters": [],
"requestBody": {
"description": "Fake request object.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Models.FakeRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success fake request",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"401": {
"description": "Not authorized.",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "String error message, not wrapped in json.",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Models.FakeRequest": {
"required": ["startDate"],
"type": "object",
"properties": {
"startDate": {
"type": "string",
"description": "Beginning of the date range",
"format": "date-time"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment