Skip to content

Instantly share code, notes, and snippets.

@blacksmithop
Created July 19, 2023 04:31
Show Gist options
  • Save blacksmithop/7e9047ef5e8e739cf25b7ed0115840b4 to your computer and use it in GitHub Desktop.
Save blacksmithop/7e9047ef5e8e739cf25b7ed0115840b4 to your computer and use it in GitHub Desktop.
{
"openapi": "3.1.0",
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"paths": {
"/": {
"get": {
"summary": "Root",
"operationId": "root__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
}
}
}
},
"/hello/{name}": {
"get": {
"summary": "Hello",
"operationId": "hello_hello__name__get",
"parameters": [
{
"required": true,
"schema": {
"type": "string",
"title": "Name"
},
"name": "name",
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/employees": {
"get": {
"summary": "List Employees",
"operationId": "list_employees_employees_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
}
}
}
},
"/add_employee": {
"post": {
"summary": "Add Employee",
"operationId": "add_employee_add_employee_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Employee"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/list_insight": {
"get": {
"summary": "List Insights",
"operationId": "list_insights_list_insight_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
}
}
}
},
"/add_insight": {
"post": {
"summary": "Add Insight",
"operationId": "add_insight_add_insight_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Insight"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Employee": {
"properties": {
"employeeId": {
"type": "integer",
"title": "Employeeid"
},
"firstName": {
"type": "string",
"title": "Firstname"
},
"lastName": {
"type": "string",
"title": "Lastname"
},
"employeePhone": {
"type": "string",
"title": "Employeephone"
},
"employeeEmail": {
"type": "string",
"title": "Employeeemail"
}
},
"type": "object",
"required": [
"employeeId",
"firstName",
"lastName",
"employeePhone",
"employeeEmail"
],
"title": "Employee"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"Insight": {
"properties": {
"Name": {
"type": "string",
"title": "Name"
},
"Insight": {
"type": "string",
"title": "Insight"
}
},
"type": "object",
"required": [
"Name",
"Insight"
],
"title": "Insight"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment