Skip to content

Commit

Permalink
chore: make openapi schema stable by removing example
Browse files Browse the repository at this point in the history
  • Loading branch information
dantetemplar committed Feb 3, 2025
1 parent b7a4837 commit 5bc26a7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/modules/bookings/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
__all__ = ["router"]

import datetime
from datetime import timedelta

from fastapi import APIRouter, HTTPException, Query
from fastapi import APIRouter, HTTPException

from src.api.dependencies import VerifiedDep
from src.api.exceptions import ObjectNotFound
Expand All @@ -17,15 +16,9 @@

router = APIRouter(tags=["Bookings"])

_now = datetime.datetime.now(datetime.UTC)


@router.get("/bookings/")
async def bookings(
_: VerifiedDep,
start: datetime.datetime = Query(example=_now.isoformat(timespec="minutes")),
end: datetime.datetime = Query(example=(_now + timedelta(hours=9)).isoformat(timespec="minutes")),
) -> list[Booking]:
async def bookings(_: VerifiedDep, start: datetime.datetime, end: datetime.datetime) -> list[Booking]:
# Fetch the bookings from Outlook
return exchange_booking_repository.get_bookings_for_all_rooms(start, end)

Expand Down

0 comments on commit 5bc26a7

Please sign in to comment.