Browse Source
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> Co-authored-by: dkreeft <dkreeft@xccelerated.io> Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>pull/3628/head
committed by
GitHub
6 changed files with 79 additions and 19 deletions
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 88 KiB |
@ -1,12 +1,37 @@ |
|||
from fastapi import FastAPI |
|||
|
|||
description = """ |
|||
ChimichangApp API helps you do awesome stuff. 🚀 |
|||
|
|||
## Items |
|||
|
|||
You can **read items**. |
|||
|
|||
## Users |
|||
|
|||
You will be able to: |
|||
|
|||
* **Create users** (_not implemented_). |
|||
* **Read users** (_not implemented_). |
|||
""" |
|||
|
|||
app = FastAPI( |
|||
title="My Super Project", |
|||
description="This is a very fancy project, with auto docs for the API and everything", |
|||
version="2.5.0", |
|||
title="ChimichangApp", |
|||
description=description, |
|||
version="0.0.1", |
|||
terms_of_service="http://example.com/terms/", |
|||
contact={ |
|||
"name": "Deadpoolio the Amazing", |
|||
"url": "http://x-force.example.com/contact/", |
|||
"email": "dp@x-force.example.com", |
|||
}, |
|||
license_info={ |
|||
"name": "Apache 2.0", |
|||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html", |
|||
}, |
|||
) |
|||
|
|||
|
|||
@app.get("/items/") |
|||
async def read_items(): |
|||
return [{"name": "Foo"}] |
|||
return [{"name": "Katana"}] |
|||
|
Loading…
Reference in new issue