diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f938a08..9cf0f88 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -93,4 +93,4 @@ jobs: cargo run --manifest-path $ROOT/Cargo.toml --example {} | tee /dev/stderr | go run . -schema ../../json_spec/output/root.json - - " \ No newline at end of file + " diff --git a/examples/extensions.rs b/examples/extensions.rs index f78886f..4a377fe 100644 --- a/examples/extensions.rs +++ b/examples/extensions.rs @@ -16,7 +16,7 @@ enum ExtensionType { } #[derive(Serialize)] -struct ComplexExtension { +struct Extension { #[serde(rename = "@type")] ext_type: ExtensionType, @@ -25,13 +25,11 @@ struct ComplexExtension { } async fn step0(s: tv::ScopedTestStep) -> Result { - s.add_extension("simple", "extension_identifier").await?; - s.add_extension( - "complex", - ComplexExtension { + "ext0", + Extension { ext_type: ExtensionType::Example, - field: "demo".to_owned(), + field: "example".to_owned(), subtypes: vec![1, 42], }, ) diff --git a/src/spec.rs b/src/spec.rs index a0cb26a..f61e9dc 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -875,7 +875,7 @@ pub struct Diagnosis { #[derive(Debug, Serialize, PartialEq, Clone)] #[serde(rename = "file")] pub struct File { - #[serde(rename = "name")] + #[serde(rename = "displayName")] pub name: String, #[serde(rename = "uri")]