Skip to content

Commit

Permalink
Merge pull request #21 from k8pl3r-sh/main
Browse files Browse the repository at this point in the history
Add "servers" parameter to FastAPI to have it on the generated "openapi.json" file
  • Loading branch information
theowni authored Jul 11, 2024
2 parents d3c9350 + dc19eb3 commit abe1bb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def start_application():
title="Damn Vulnerable RESTaurant",
description="An intentionally vulnerable API service designed for learning and training purposes for ethical hackers, security engineers, and developers.",
version="1.0.0",
servers=[
{"url": "http://localhost:8080", "description": "Local API server"}
]
)
app.add_middleware(
CORSMiddleware,
Expand Down

0 comments on commit abe1bb1

Please sign in to comment.