Skip to content

Commit

Permalink
chg: [api] Added contact and license informations to the OpenAPI metada.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Dec 13, 2023
1 parent daf0615 commit 9f2b0ba
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion api/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any
from typing import Dict
from typing import List

from fastapi import Depends
Expand All @@ -15,14 +17,24 @@
app = FastAPI()


def custom_openapi():
def custom_openapi() -> Dict[str, Any]:
if app.openapi_schema:
return app.openapi_schema
openapi_schema = get_openapi(
title="SCANDALE - Pumpkin",
version="0.1.0",
summary="API of the Pumpkin project.",
description="Backend API for collecting data from probes and storing proof of checks from various scans.",
contact={
"name": "Computer Incident Response Center Luxembourg",
"url": "https://www.circl.lu",
"email": "[email protected]",
},
license_info={
"name": "GNU Affero General Public License v3.0 or later",
"identifier": "AGPL-3.0-or-later",
"url": "https://www.gnu.org/licenses/agpl-3.0.en.html",
},
routes=app.routes,
)
openapi_schema["info"]["x-logo"] = {
Expand Down

0 comments on commit 9f2b0ba

Please sign in to comment.