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:
KtorZ
2023-04-05 11:51:26 +02:00
parent f0d2d20a4c
commit cdc7ebf9a0
4 changed files with 28 additions and 45 deletions

View File

@@ -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