Skip to content

Commit

Permalink
Set default factory for optional dictionary fields in GenerateUrlRequ…
Browse files Browse the repository at this point in the history
…est parameter
  • Loading branch information
mhdzumair committed Nov 16, 2024
1 parent bcf22d2 commit 57a4202
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mediaflow_proxy/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ class GenerateUrlRequest(BaseModel):
mediaflow_proxy_url: str = Field(..., description="The base URL for the mediaflow proxy.")
endpoint: str | None = Field(None, description="The specific endpoint to be appended to the base URL.")
destination_url: str | None = Field(None, description="The destination URL to which the request will be proxied.")
query_params: dict | None = Field(None, description="Query parameters to be included in the request.")
request_headers: dict | None = Field(None, description="Headers to be included in the request.")
response_headers: dict | None = Field(None, description="Headers to be included in the response.")
query_params: dict | None = Field(
default_factory=dict, description="Query parameters to be included in the request."
)
request_headers: dict | None = Field(default_factory=dict, description="Headers to be included in the request.")
response_headers: dict | None = Field(default_factory=dict, description="Headers to be included in the response.")
expiration: int | None = Field(
None, description="Expiration time for the URL in seconds. If not provided, the URL will not expire."
)
Expand Down

0 comments on commit 57a4202

Please sign in to comment.