1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-19 13:19:41 +02:00

chore: refactor base schema (#1098)

* remove dead backup code

* implmenet own base model

* refactor to use MealieModel instead of CamelModel

* cleanup deps
This commit is contained in:
Hayden 2022-03-25 10:56:49 -08:00 committed by GitHub
parent bcd98cba2f
commit 11b4d2389a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 253 additions and 623 deletions

View file

@ -96,7 +96,7 @@ def generate_typescript_types() -> None:
try:
path_as_module = path_to_module(module)
generate_typescript_defs(path_as_module, str(out_path), exclude=("CamelModel")) # type: ignore
generate_typescript_defs(path_as_module, str(out_path), exclude=("MealieModel")) # type: ignore
except Exception as e:
failed_modules.append(module)
print("\nModule Errors:", module, "-----------------") # noqa

View file

@ -3,11 +3,12 @@ import pathlib
import _static
import dotenv
import requests
from fastapi_camelcase import CamelModel
from jinja2 import Template
from requests import Response
from rich import print
from mealie.schema._mealie import MealieModel
BASE = pathlib.Path(__file__).parent.parent.parent
API_KEY = dotenv.get_key(BASE / ".env", "CROWDIN_API_KEY")
@ -57,7 +58,7 @@ export const LOCALES = [{% for locale in locales %}
"""
class TargetLanguage(CamelModel):
class TargetLanguage(MealieModel):
id: str
name: str
locale: str