Skip to content

Commit

Permalink
feat: add metadata for openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyvy-vi committed Aug 7, 2021
1 parent 1bf0adf commit 71f6bd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.1"
description = "An API for the Heptagram Bot"
authors = ["Vyvy-vi <vyom.j@protonmail.com>"]
license = "BSD-3-Clause"
repository = "https://github.com/Heptgram/api"
repository = "https://github.com/Heptgram-Bot/api"

[tool.poetry.dependencies]
python = "^3.7"
Expand Down
11 changes: 10 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@

# from pydantic import BaseModel

app = FastAPI()
app = FastAPI(
title="heptagram-api",
description="An API for the Heptagram Bot",
contact={"name": "Vyvy-vi", "url": "https://github.com/Vyvy-vi"},
license_info={
"name": "BSD-3-Clause",
"url": "https://github.com/Heptagram-Bot/api/blob/master/LICENSE.md",
},
)

jokes = ["Jokes are going through", "hehe this is a joke", "more jokes"]

Expand Down Expand Up @@ -53,5 +61,6 @@ def _diceroll(
}
)


if __name__ == "__main__":
uvicorn.run("src.main:app")

0 comments on commit 71f6bd1

Please sign in to comment.