()
| 366 | }, |
| 367 | "data2": { |
| 368 | "$ref": "#/myref" |
| 369 | } |
| 370 | }, |
| 371 | "myref": { |
| 372 | "data": { |
| 373 | "$ref": "#/myref2" |
| 374 | } |
| 375 | }, |
| 376 | "myref2": { |
| 377 | "content": { |
| 378 | "data": "test" |
| 379 | } |
| 380 | } |
| 381 | }); |
| 382 | |
| 383 | let expected = json!({ |
| 384 | "test": { |
| 385 | "data1": { |
| 386 | "data": { |
| 387 | "content": { |
| 388 | "data": "test" |
| 389 | }, |
| 390 | "x-fromRef": "#/myref2", |
| 391 | "x-refName": "myref2" |
| 392 | }, |
| 393 | "x-fromRef": "#/myref", |
| 394 | "x-refName": "myref" |
| 395 | }, |
| 396 | "data2": { |
| 397 | "data": { |
| 398 | "content": { |
| 399 | "data": "test" |
| 400 | }, |
| 401 | "x-fromRef": "#/myref2", |
| 402 | "x-refName": "myref2" |
| 403 | }, |
| 404 | "x-fromRef": "#/myref", |
| 405 | "x-refName": "myref" |
| 406 | } |
| 407 | }, |
| 408 | "myref": { |
| 409 | "data": { |
| 410 | "content": { |
| 411 | "data": "test" |
| 412 | }, |
| 413 | "x-fromRef": "#/myref2", |
| 414 | "x-refName": "myref2" |
| 415 | } |
| 416 | }, |
| 417 | "myref2": { |
| 418 | "content": { |
| 419 | "data": "test" |
| 420 | } |
| 421 | } |
| 422 | }); |
| 423 | |
| 424 | let resolved = resolve_refs_raw(json)?; |
| 425 | println!("{}", resolved); |
nothing calls this directly
no test coverage detected