mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-26 10:08:58 +03:00
18 lines
369 B
Python
18 lines
369 B
Python
"""JSON schema utilities for Frigate."""
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
def get_config_schema(config_class: type[BaseModel]) -> dict[str, Any]:
|
|
"""Get the JSON schema for FrigateConfig.
|
|
|
|
Args:
|
|
config_class: The config model to describe
|
|
|
|
Returns:
|
|
The JSON schema
|
|
"""
|
|
return config_class.model_json_schema()
|