-
Notifications
You must be signed in to change notification settings - Fork 29
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
add metadata model #38
Conversation
…into metadataModel
exclude_none=True, | ||
exclude={"metadata"}, | ||
by_alias=True, | ||
) | ||
metadata = body.metadata or {} | ||
return search, metadata | ||
return model.PgSTACSearch(**search), body.metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: @drnextgis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! As soon as it is merged, I will update the example in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏 , for now I'm still waiting for some feedback on the metadata model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d3eecdc#diff-0f0c40de44a0841ed5180f16d66212d1cece2a7d4400789007c2f73bf8432622L39 I updated the docs 🙏
class RegisterMosaic(PgSTACSearch): | ||
"""Model of /register endpoint input.""" | ||
|
||
metadata: Metadata = Field(default_factory=Metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metadata will always be set when registering a search
with the RegisterMosaic
. default metadata should be {"type": "mosaic"}
Looks good to me. Just one question: what is the purpose of having |
I guess my goal is to quickly differentiate search requests |
add pgstac Search model
FYI: I'm going to merge this to Master, but anyone interested can still make comments over #30 |
ref #30
This PR adds a
SearchMetadata
model defining themosaic
metadata that could be provided by the user whenregistering
a search request.Metadata