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

support custom data models #58

Closed
geospatial-jeff opened this issue Nov 21, 2020 · 3 comments · Fixed by #147
Closed

support custom data models #58

geospatial-jeff opened this issue Nov 21, 2020 · 3 comments · Fixed by #147

Comments

@geospatial-jeff
Copy link
Collaborator

Currently there is no good way to use a different data model than what is defined in models/database.py. Currently this is difficult to change in a way that is sustainable long term, should be much easier once #57 is resolved.

@matprov
Copy link

matprov commented Feb 26, 2021

Thanks @geospatial-jeff for addressing this issue, it will have a great impact on the way we could extend the implementation with custom schemas. I was wondering if this issue is currently in your short term pipeline or not. There are some attributes which we would like to add to items via custom schemas and want to make sure that these attributes could be queryable. Also, I was wondering if it could be possible to search in the properties JSONB document for custom property, or it absolutely needs to be indexed in a different column (#70) for search purposes.

@geospatial-jeff
Copy link
Collaborator Author

Several of us jumped on a call to discuss this issue and this is what we came up with: https://github.com/stac-utils/stac-fastapi/wiki/Custom-Models

The short of it is to remove pydantic as the interface between the API layer and the backend clients.

@kylebarron
Copy link
Contributor

No disagreement there; think it's a valid conclusion. Just wish Pydantic were flexible enough to handle this use case.

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

Successfully merging a pull request may close this issue.

3 participants