Skip to content

Commit 4043d22

Browse files
authored
feat: update JSON schema format for TestRecord in mod.rs (#373)
1 parent aa893cc commit 4043d22

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
pulsar-version: [2.10.6, 2.11.4, 3.0.8, 3.2.4, 3.3.3, 4.0.1]
42+
pulsar-version: [2.10.6, 2.11.4, 3.0.8, 3.2.4, 3.3.3, 4.0.1, 4.1.2]
4343
steps:
4444
- uses: actions/checkout@v4
4545
- uses: dtolnay/rust-toolchain@stable

src/consumer/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,19 +1231,19 @@ mod tests {
12311231
let client: Pulsar<_> = Pulsar::builder(addr, TokioExecutor).build().await.unwrap();
12321232

12331233
let json_schema = serde_json::json!({
1234-
"$id": "https://example.com/test.schema.json",
1235-
"$schema": "https://json-schema.org/draft/2020-12/schema",
1236-
"title": "TestRecord",
1237-
"type": "object",
1238-
"properties": {
1239-
"name": {
1240-
"type": "string",
1241-
},
1242-
"age": {
1243-
"type": "integer",
1244-
"minimum": 0
1245-
}
1234+
"type": "record",
1235+
"name": "TestRecord",
1236+
"namespace": "com.example",
1237+
"fields": [
1238+
{
1239+
"name": "name",
1240+
"type": "string"
1241+
},
1242+
{
1243+
"name": "age",
1244+
"type": "int"
12461245
}
1246+
]
12471247
});
12481248

12491249
let schema_data = serde_json::to_vec(&json_schema).unwrap();

0 commit comments

Comments
 (0)