()
| 437 | }, |
| 438 | "data2": { |
| 439 | "$ref": "#/myref" |
| 440 | } |
| 441 | }, |
| 442 | "myref": { |
| 443 | "data": { |
| 444 | "$ref": "#/myref2" |
| 445 | } |
| 446 | }, |
| 447 | "myref2": { |
| 448 | "content": { |
| 449 | "data": "test" |
| 450 | } |
| 451 | } |
| 452 | }); |
| 453 | |
| 454 | let expected = json!({ |
| 455 | "test": { |
| 456 | "data1": { |
| 457 | "data": { |
| 458 | "content": { |
| 459 | "data": "test" |
| 460 | }, |
| 461 | "x-fromRef": "#/myref2", |
| 462 | "x-refName": "myref2" |
| 463 | }, |
| 464 | "x-fromRef": "#/myref", |
| 465 | "x-refName": "myref" |
| 466 | }, |
| 467 | "data2": { |
| 468 | "data": { |
| 469 | "content": { |
| 470 | "data": "test" |
| 471 | }, |
| 472 | "x-fromRef": "#/myref2", |
| 473 | "x-refName": "myref2" |
| 474 | }, |
| 475 | "x-fromRef": "#/myref", |
| 476 | "x-refName": "myref" |
| 477 | } |
| 478 | }, |
| 479 | "myref": { |
| 480 | "data": { |
| 481 | "content": { |
| 482 | "data": "test" |
| 483 | }, |
| 484 | "x-fromRef": "#/myref2", |
| 485 | "x-refName": "myref2" |
| 486 | } |
| 487 | }, |
| 488 | "myref2": { |
| 489 | "content": { |
| 490 | "data": "test" |
| 491 | } |
| 492 | } |
| 493 | }); |
| 494 | |
| 495 | let resolved = resolve_refs_raw(json)?; |
| 496 | println!("{}", resolved); |
nothing calls this directly
no test coverage detected