Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
docs(swagger): exclude basic routes from swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Mar 28, 2024
1 parent b4e35ce commit 89143d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/app/api/api_v1/endpoints/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
router = APIRouter()


@router.get("/authorize", summary="Request authorization code through GitHub OAuth app")
@router.get("/authorize", summary="Request authorization code through GitHub OAuth app", include_in_schema=False)
async def authorize_github(
scope: str,
redirect_uri: HttpUrl,
Expand All @@ -34,7 +34,12 @@ async def authorize_github(
)


@router.post("/github", status_code=status.HTTP_200_OK, summary="Request a GitHub token from authorization code")
@router.post(
"/github",
status_code=status.HTTP_200_OK,
summary="Request a GitHub token from authorization code",
include_in_schema=False,
)
async def request_github_token_from_code(
payload: TokenRequest,
) -> GHToken:
Expand Down
2 changes: 1 addition & 1 deletion src/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def startup() -> None:


# Healthcheck
@app.get("/status", status_code=status.HTTP_200_OK, summary="Healthcheck for the API")
@app.get("/status", status_code=status.HTTP_200_OK, summary="Healthcheck for the API", include_in_schema=False)
def get_status() -> Status:
return Status(status="ok")

Expand Down

0 comments on commit 89143d9

Please sign in to comment.