Skip to content

Pydantic validation of extensions #269

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fmigneault
Copy link

Related Issue(s):

Description:

  • add validate_extensions setting that enables validation of stac_extensions from submitted STAC objects
    using the stac_pydantic.extensions.validate_extensions utility. Applicable only when TransactionExtension
    is active.
  • add validatation extra requirement to install additional dependencies required by extension validation (stac-pydantic does not install requests and jsonschema by default)

Given that these checks do not specifically require pgstac (JSON schema validation of remote extension definitions), it could be moved to the parent stac-fastapi. However, I was not sure how that could be integrated since https://github.com/stac-utils/stac-fastapi/blob/main/stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/client.py only contains some abstract classes. Should a mixin be used, which would be added as base class of ClientValidateMixIn?

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

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 this pull request may close these issues.

1 participant