Remove now-unnecessary blueprint generics.
These were needed before as a way to _partially deserialize_ blueprints. Indeed, some commands required accessing information of the blueprint, but not necessarily the schema. So out of laziness (or cleverness?), we only deserialized validators as serde::Value and achieved that through the use of generics. Now that validators and schemas have proper deserialisers, we can simply deserialize a blueprint. TODO: Our serialisation/deserialisation is safe with regards to itself; i.e. it roundtrips. However, we only supports a subset of the specified blueprint format. For example, we would fail to deserialize blueprints that have inline data-schemas (we only use references).
This commit is contained in:
@@ -65,7 +65,7 @@ pub fn exec(
|
||||
.map_err(|_| BlueprintError::InvalidOrMissingFile)
|
||||
.into_diagnostic()?;
|
||||
|
||||
let blueprint: Blueprint<serde_json::Value, serde_json::Value> =
|
||||
let blueprint: Blueprint =
|
||||
serde_json::from_reader(BufReader::new(blueprint)).into_diagnostic()?;
|
||||
|
||||
// Perform the conversion
|
||||
|
||||
Reference in New Issue
Block a user