Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(schemas): написать ограничения на pydantic схемы такие как в sqlalchemy моделях #14

Closed
maxim1770 opened this issue Jan 7, 2023 · 0 comments · Fixed by #25
Labels
bug Something isn't working refactor

Comments

@maxim1770
Copy link
Owner

  • может ли быть None
  • уникальный ли поле (без повторов)
  • ограничения на типы (Напр: int -> [1, 3..] - для зачало), так же ограничения на строки по длине + можно попробовать regex
  • ограничения на slag (для title_en), что должны быть лишь англ буквы цифры и _ (про цифры так же подумать, может где-то и без цифр)
  • Смотреть на документацию pydantic и делать может добавлять еще какие-то валидации и более подходящие типы данных
@maxim1770 maxim1770 added bug Something isn't working refactor labels Jan 7, 2023
@maxim1770 maxim1770 linked a pull request Jan 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant