Skip to content

Commit df90729

Browse files
committed
Update CLI expected outputs
1 parent 2e6d41d commit df90729

8 files changed

Lines changed: 40 additions & 0 deletions

File tree

tests/data/expected/main/help/color.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ For detailed usage, see: https://datamodel-code-generator.koxudaxi.dev
3939
(example: "Authorization: Basic dXNlcjpwYXNz")
4040
--http-ignore-tls Disable verification of the remote host's TLS
4141
certificate
42+
--http-local-ref-path HTTP_LOCAL_REF_PATH
43+
Resolve HTTP(S) JSON Schema $ref URLs from a local
44+
directory instead of fetching them. URLs are mapped
45+
under the directory by host and path; extensionless
46+
refs also try '.json'.
4247
--http-query-parameters HTTP_QUERY_PARAMETERS [HTTP_QUERY_PARAMETERS ...]
4348
Set query parameters in HTTP requests to the remote
4449
host. (example: "ref=branch")

tests/data/expected/main/help/no_color.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ Options:
3939
(example: "Authorization: Basic dXNlcjpwYXNz")
4040
--http-ignore-tls Disable verification of the remote host's TLS
4141
certificate
42+
--http-local-ref-path HTTP_LOCAL_REF_PATH
43+
Resolve HTTP(S) JSON Schema $ref URLs from a local
44+
directory instead of fetching them. URLs are mapped
45+
under the directory by host and path; extensionless
46+
refs also try '.json'.
4247
--http-query-parameters HTTP_QUERY_PARAMETERS [HTTP_QUERY_PARAMETERS ...]
4348
Set query parameters in HTTP requests to the remote
4449
host. (example: "ref=branch")

tests/data/expected/main/input_model/config_class.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ class GenerateConfig(TypedDict, closed=True):
195195
allof_class_hierarchy: NotRequired[AllOfClassHierarchy]
196196
allow_remote_refs: NotRequired[bool | None]
197197
http_headers: NotRequired[Sequence[tuple[str, str]] | None]
198+
http_local_ref_path: NotRequired[str | None]
198199
http_ignore_tls: NotRequired[bool]
199200
http_timeout: NotRequired[float | None]
200201
use_annotated: NotRequired[bool]

tests/data/expected/main_kr/generate_prompt/basic.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
- `--generate-pyproject-config`: Generate pyproject.toml configuration from CLI arguments.
163163
- `--http-headers`: Fetch schema from URL with custom HTTP headers.
164164
- `--http-ignore-tls`: Disable TLS certificate verification for HTTPS requests.
165+
- `--http-local-ref-path`: Resolve HTTP references from local schema files.
165166
- `--http-query-parameters`: Add query parameters to HTTP requests for remote schemas.
166167
- `--http-timeout`: Set timeout for HTTP requests to remote hosts.
167168
- `--ignore-pyproject`: Ignore pyproject.toml configuration file.
@@ -215,6 +216,11 @@ For detailed usage, see: https://datamodel-code-generator.koxudaxi.dev
215216
(example: "Authorization: Basic dXNlcjpwYXNz")
216217
--http-ignore-tls Disable verification of the remote host's TLS
217218
certificate
219+
--http-local-ref-path HTTP_LOCAL_REF_PATH
220+
Resolve HTTP(S) JSON Schema $ref URLs from a local
221+
directory instead of fetching them. URLs are mapped
222+
under the directory by host and path; extensionless
223+
refs also try '.json'.
218224
--http-query-parameters HTTP_QUERY_PARAMETERS [HTTP_QUERY_PARAMETERS ...]
219225
Set query parameters in HTTP requests to the remote
220226
host. (example: "ref=branch")

tests/data/expected/main_kr/generate_prompt/with_list_options.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
- `--generate-pyproject-config`: Generate pyproject.toml configuration from CLI arguments.
163163
- `--http-headers`: Fetch schema from URL with custom HTTP headers.
164164
- `--http-ignore-tls`: Disable TLS certificate verification for HTTPS requests.
165+
- `--http-local-ref-path`: Resolve HTTP references from local schema files.
165166
- `--http-query-parameters`: Add query parameters to HTTP requests for remote schemas.
166167
- `--http-timeout`: Set timeout for HTTP requests to remote hosts.
167168
- `--ignore-pyproject`: Ignore pyproject.toml configuration file.
@@ -215,6 +216,11 @@ For detailed usage, see: https://datamodel-code-generator.koxudaxi.dev
215216
(example: "Authorization: Basic dXNlcjpwYXNz")
216217
--http-ignore-tls Disable verification of the remote host's TLS
217218
certificate
219+
--http-local-ref-path HTTP_LOCAL_REF_PATH
220+
Resolve HTTP(S) JSON Schema $ref URLs from a local
221+
directory instead of fetching them. URLs are mapped
222+
under the directory by host and path; extensionless
223+
refs also try '.json'.
218224
--http-query-parameters HTTP_QUERY_PARAMETERS [HTTP_QUERY_PARAMETERS ...]
219225
Set query parameters in HTTP requests to the remote
220226
host. (example: "ref=branch")

tests/data/expected/main_kr/generate_prompt/with_options.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ What other options should I use?
168168
- `--generate-pyproject-config`: Generate pyproject.toml configuration from CLI arguments.
169169
- `--http-headers`: Fetch schema from URL with custom HTTP headers.
170170
- `--http-ignore-tls`: Disable TLS certificate verification for HTTPS requests.
171+
- `--http-local-ref-path`: Resolve HTTP references from local schema files.
171172
- `--http-query-parameters`: Add query parameters to HTTP requests for remote schemas.
172173
- `--http-timeout`: Set timeout for HTTP requests to remote hosts.
173174
- `--ignore-pyproject`: Ignore pyproject.toml configuration file.
@@ -221,6 +222,11 @@ For detailed usage, see: https://datamodel-code-generator.koxudaxi.dev
221222
(example: "Authorization: Basic dXNlcjpwYXNz")
222223
--http-ignore-tls Disable verification of the remote host's TLS
223224
certificate
225+
--http-local-ref-path HTTP_LOCAL_REF_PATH
226+
Resolve HTTP(S) JSON Schema $ref URLs from a local
227+
directory instead of fetching them. URLs are mapped
228+
under the directory by host and path; extensionless
229+
refs also try '.json'.
224230
--http-query-parameters HTTP_QUERY_PARAMETERS [HTTP_QUERY_PARAMETERS ...]
225231
Set query parameters in HTTP requests to the remote
226232
host. (example: "ref=branch")

tests/data/expected/main_kr/generate_prompt/with_question.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ How do I convert enums to Literal types?
166166
- `--generate-pyproject-config`: Generate pyproject.toml configuration from CLI arguments.
167167
- `--http-headers`: Fetch schema from URL with custom HTTP headers.
168168
- `--http-ignore-tls`: Disable TLS certificate verification for HTTPS requests.
169+
- `--http-local-ref-path`: Resolve HTTP references from local schema files.
169170
- `--http-query-parameters`: Add query parameters to HTTP requests for remote schemas.
170171
- `--http-timeout`: Set timeout for HTTP requests to remote hosts.
171172
- `--ignore-pyproject`: Ignore pyproject.toml configuration file.
@@ -219,6 +220,11 @@ For detailed usage, see: https://datamodel-code-generator.koxudaxi.dev
219220
(example: "Authorization: Basic dXNlcjpwYXNz")
220221
--http-ignore-tls Disable verification of the remote host's TLS
221222
certificate
223+
--http-local-ref-path HTTP_LOCAL_REF_PATH
224+
Resolve HTTP(S) JSON Schema $ref URLs from a local
225+
directory instead of fetching them. URLs are mapped
226+
under the directory by host and path; extensionless
227+
refs also try '.json'.
222228
--http-query-parameters HTTP_QUERY_PARAMETERS [HTTP_QUERY_PARAMETERS ...]
223229
Set query parameters in HTTP requests to the remote
224230
host. (example: "ref=branch")

tests/data/expected/main_kr/help_shows_new_options.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ For detailed usage, see: https://datamodel-code-generator.koxudaxi.dev
3939
(example: "Authorization: Basic dXNlcjpwYXNz")
4040
--http-ignore-tls Disable verification of the remote host's TLS
4141
certificate
42+
--http-local-ref-path HTTP_LOCAL_REF_PATH
43+
Resolve HTTP(S) JSON Schema $ref URLs from a local
44+
directory instead of fetching them. URLs are mapped
45+
under the directory by host and path; extensionless
46+
refs also try '.json'.
4247
--http-query-parameters HTTP_QUERY_PARAMETERS [HTTP_QUERY_PARAMETERS ...]
4348
Set query parameters in HTTP requests to the remote
4449
host. (example: "ref=branch")

0 commit comments

Comments
 (0)