Skip to content

Commit 4861f02

Browse files
committed
chore: update for latest spec-0.4
Signed-off-by: David Bernard <[email protected]>
1 parent 40028d2 commit 4861f02

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cdevents-sdk/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub(crate) struct Context {
1414
pub(crate) timestamp: time::OffsetDateTime,
1515
#[serde(rename = "schemaUri", skip_serializing_if = "Option::is_none")]
1616
pub(crate) schema_uri: Option<Uri>,
17-
#[serde(rename = "chain_id", skip_serializing_if = "Option::is_none")]
17+
#[serde(rename = "chainId", skip_serializing_if = "Option::is_none")]
1818
pub(crate) chain_id: Option<String>,
1919
#[serde(skip_serializing_if = "Option::is_none")]
2020
pub(crate) links: Option<serde_json::Value>,

cdevents-sdk/tests/specs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn events_schemas() -> &'static EventsSchemas {
7878
}
7979

8080
#[rstest]
81-
fn can_serde_example(#[files("../cdevents-specs/spec-*/examples/*.json")] path: PathBuf) {
81+
fn can_serde_example(#[files("../cdevents-specs/spec-*/examples/*.json")] #[files("../cdevents-specs/spec-*/conformance/*.json")] path: PathBuf) {
8282
let example_txt = fs::read_to_string(path).expect("to read file as string");
8383
// HACK uri are stored ad http::Uri, they are "normalized" when serialized, so prenormalization to avoid failure like
8484
// json atoms at path ".subject.content.repository.source" are not equal:
@@ -102,7 +102,7 @@ fn can_serde_example(#[files("../cdevents-specs/spec-*/examples/*.json")] path:
102102
}
103103

104104
#[rstest]
105-
fn validate_example_against_schema(#[files("../cdevents-specs/spec-*/examples/*.json")] path: PathBuf) {
105+
fn validate_example_against_schema(#[files("../cdevents-specs/spec-*/examples/*.json")] #[files("../cdevents-specs/spec-*/conformance/*.json")] path: PathBuf) {
106106
let events_schemas = events_schemas();
107107
let example_txt = fs::read_to_string(path).expect("to read file as string");
108108
let example_json: serde_json::Value =

0 commit comments

Comments
 (0)