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

[Feature Request]: Use pydantic for data validation #26

Open
bgrnwd opened this issue May 25, 2024 · 2 comments
Open

[Feature Request]: Use pydantic for data validation #26

bgrnwd opened this issue May 25, 2024 · 2 comments

Comments

@bgrnwd
Copy link
Owner

bgrnwd commented May 25, 2024

What feature would you like to see?

https://docs.pydantic.dev/latest/

@rbarman
Copy link

rbarman commented May 29, 2024

Is the expected schema for each API endpoint documented somewhere?

I was thinking of building pydantic models for each API endpoint result (Match details, Player details, Team details, etc), but it will be tricky if we don't know the expected schema. For example, this call to the match details endpoint (https://www.fotmob.com/api/matchDetails?matchId=4446454) returns a complex nested json with around 20k lines. Technically we could go through the results of each endpoint and reason about the schema ourselves, but it would be great if the 'true' schema is defined somewhere.

@bgrnwd
Copy link
Owner Author

bgrnwd commented May 31, 2024

The schema isn't defined anywhere as far as I'm aware. It may only make sense for the endpoints where the JSON structure isn't as complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants