@@ -827,8 +827,28 @@ def test_main_root_id_jsonschema_with_local_file(mocker: MockerFixture, output_f
827827 httpx_get_mock .assert_not_called ()
828828
829829
830+ @pytest .mark .cli_doc (
831+ options = ["--allow-remote-refs" ],
832+ option_description = """Enable fetching of `$ref` targets over HTTP/HTTPS.
833+
834+ When enabled, the generator will resolve `$ref` references that point to remote URLs,
835+ including relative refs resolved against a schema's `$id` base URL. This is required
836+ for schemas that reference definitions hosted on external servers.
837+
838+ Automatically enabled when using `--url` input.""" ,
839+ input_schema = "jsonschema/root_id.json" ,
840+ cli_args = ["--allow-remote-refs" ],
841+ golden_output = "main/jsonschema/root_id.py" ,
842+ )
830843def test_main_root_id_jsonschema_with_remote_file (mocker : MockerFixture , tmp_path : Path ) -> None :
831- """Test root ID JSON Schema with remote file reference."""
844+ """Enable fetching of `$ref` targets over HTTP/HTTPS.
845+
846+ When enabled, the generator will resolve `$ref` references that point to remote URLs,
847+ including relative refs resolved against a schema's `$id` base URL. This is required
848+ for schemas that reference definitions hosted on external servers.
849+
850+ Automatically enabled when using `--url` input.
851+ """
832852 root_id_response = mocker .Mock ()
833853 root_id_response .text = "dummy"
834854 person_response = mocker .Mock ()
@@ -945,7 +965,6 @@ def test_main_root_id_jsonschema_with_absolute_local_file(output_file: Path) ->
945965 )
946966
947967
948- @pytest .mark .cli_doc (options = ["--allow-remote-refs" ])
949968def test_main_remote_ref_blocked_by_default (tmp_path : Path , capsys : pytest .CaptureFixture [str ]) -> None :
950969 """Test that remote $ref fetching is blocked when --allow-remote-refs is not set."""
951970 schema = {
0 commit comments