diff --git a/v0.5/fastn-unresolved/src/resolver/arguments.rs b/v0.5/fastn-unresolved/src/resolver/arguments.rs
index 3f81b6289..748153649 100644
--- a/v0.5/fastn-unresolved/src/resolver/arguments.rs
+++ b/v0.5/fastn-unresolved/src/resolver/arguments.rs
@@ -33,6 +33,12 @@ pub fn arguments(
Err(e) => *p = fastn_unresolved::UR::Invalid(e),
}
}
+
+ // TODO: check if any required argument is missing (should only be done when everything is
+ // resolved, how do we track this resolution?
+ // maybe this function can return a bool to say everything is resolved? but if everything
+ // is marked resolved, we have an issue, maybe we put something extra in properties in
+ // unresolved state, and resolve only when this is done?
}
fn caption_or_body(
@@ -81,26 +87,57 @@ enum Property<'a> {
Body,
}
+impl Property<'_> {
+ fn source(&self) -> fastn_resolved::PropertySource {
+ match self {
+ Property::Field(f) => fastn_resolved::PropertySource::Header {
+ name: f.to_string(),
+ mutable: false,
+ },
+ Property::Body => fastn_resolved::PropertySource::Body,
+ Property::Caption => fastn_resolved::PropertySource::Caption,
+ }
+ }
+}
+
fn resolve_argument(
arguments: &[fastn_resolved::Argument],
property: Property,
- _value: &fastn_section::HeaderValue,
+ value: &fastn_section::HeaderValue,
) -> Result