diff --git a/docs/cli-reference/index.md b/docs/cli-reference/index.md index a7275f753..66b121494 100644 --- a/docs/cli-reference/index.md +++ b/docs/cli-reference/index.md @@ -13,7 +13,7 @@ This documentation is auto-generated from test cases. | 🏷️ [Field Customization](field-customization.md) | 22 | Field naming and docstring behavior | | 🏗️ [Model Customization](model-customization.md) | 39 | Model generation behavior | | 🎨 [Template Customization](template-customization.md) | 18 | Output formatting and custom rendering | -| 📘 [OpenAPI-only Options](openapi-only-options.md) | 6 | OpenAPI-specific features | +| 📘 [OpenAPI-only Options](openapi-only-options.md) | 7 | OpenAPI-specific features | | ⚙️ [General Options](general-options.md) | 15 | Utilities and meta options | | 📝 [Utility Options](utility-options.md) | 6 | Help, version, debug options | @@ -136,6 +136,7 @@ This documentation is auto-generated from test cases. ### O {#o} +- [`--openapi-include-paths`](openapi-only-options.md#openapi-include-paths) - [`--openapi-scopes`](openapi-only-options.md#openapi-scopes) - [`--original-field-name-delimiter`](field-customization.md#original-field-name-delimiter) - [`--output`](base-options.md#output) diff --git a/docs/cli-reference/openapi-only-options.md b/docs/cli-reference/openapi-only-options.md index 066cc8cc7..ed3400fda 100644 --- a/docs/cli-reference/openapi-only-options.md +++ b/docs/cli-reference/openapi-only-options.md @@ -5,6 +5,7 @@ | Option | Description | |--------|-------------| | [`--include-path-parameters`](#include-path-parameters) | Include OpenAPI path parameters in generated parameter model... | +| [`--openapi-include-paths`](#openapi-include-paths) | Filter OpenAPI paths to include in model generation. | | [`--openapi-scopes`](#openapi-scopes) | Specify OpenAPI scopes to generate (schemas, paths, paramete... | | [`--read-only-write-only-model-type`](#read-only-write-only-model-type) | Generate separate request and response models for readOnly/w... | | [`--use-operation-id-as-name`](#use-operation-id-as-name) | Use OpenAPI operationId as the generated function/class name... | @@ -108,6 +109,425 @@ models that include both path and query parameters. --- +## `--openapi-include-paths` {#openapi-include-paths} + +Filter OpenAPI paths to include in model generation. + +The `--openapi-include-paths` flag allows filtering which paths are processed. + +!!! tip "Usage" + + ```bash + datamodel-codegen --input schema.json --openapi-scopes paths schemas --openapi-include-paths /pets* # (1)! + ``` + + 1. :material-arrow-left: `--openapi-include-paths` - the option documented here + +??? example "Examples" + + **Input Schema:** + + ```yaml + openapi: "3.0.0" + info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT + description: | + This description is for testing + multi-line + description + + servers: + - url: http://petstore.swagger.io/v1 + security: + - BearerAuth: [] + paths: + /pets: + $ref: '#/components/pathItems/Pets' + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + put: + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + summary: update a pet + tags: + - pets + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/PetForm' + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + x-amazon-apigateway-integration: + uri: + Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${PythonVersionFunction.Arn}/invocations + passthroughBehavior: when_no_templates + httpMethod: POST + type: aws_proxy + /food: + post: + summary: Create a food + tags: + - pets + requestBody: + required: true + content: + application/problem+json: + schema: + type: string + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/problem+json: + schema: + type: string + /food/{food_id}: + get: + summary: Info for a specific pet + operationId: showFoodById + tags: + - foods + parameters: + - name: food_id + in: path + description: The id of the food to retrieve + schema: + type: string + - name: message_texts + in: query + required: false + explode: true + schema: + type: array + items: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + type: integer + examples: + example-1: + value: + - 0 + - 1 + - 3 + x-amazon-apigateway-integration: + uri: + Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${PythonVersionFunction.Arn}/invocations + passthroughBehavior: when_no_templates + httpMethod: POST + type: aws_proxy + /foo: + get: + tags: + - foo + responses: + '200': + description: OK + content: + application/json: + schema: + type: string + parameters: + - $ref: '#/components/parameters/MyParam' + /bar: + post: + summary: Create a bar + tags: + - bar + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PetForm' + /user: + get: + tags: + - user + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + timestamp: + type: string + format: date-time + name: + type: string + age: + type: string + required: + - name + - timestamp + post: + tags: + - user + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + timestamp: + type: string + format: date-time + name: + type: string + age: + type: string + required: + - name + - timestamp + responses: + '201': + description: OK + /users: + get: + tags: + - user + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + type: object + properties: + timestamp: + type: string + format: date-time + name: + type: string + age: + type: string + required: + - name + - timestamp + post: + tags: + - user + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + properties: + timestamp: + type: string + format: date-time + name: + type: string + age: + type: string + required: + - name + - timestamp + responses: + '201': + description: OK + components: + parameters: + MyParam: + name: foo + in: query + schema: + type: string + securitySchemes: + BearerAuth: + type: http + scheme: bearer + schemas: + Pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string + PetForm: + title: PetForm + type: object + properties: + name: + type: string + age: + type: integer + pathItems: + Pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + security: [] + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + default: 0 + type: integer + format: int32 + - name: HomeAddress + in: query + required: false + schema: + default: 'Unknown' + type: string + - name: kind + in: query + required: false + schema: + default: dog + type: string + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + type: array + items: + - $ref: "#/components/schemas/Pet" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + summary: Create a pet + tags: + - pets + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PetForm' + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + ``` + + **Output:** + + ```python + # generated by datamodel-codegen: + # filename: body_and_parameters.yaml + # timestamp: 2019-07-26T00:00:00+00:00 + + from __future__ import annotations + + from pydantic import BaseModel + + + class Pet(BaseModel): + id: int + name: str + tag: str | None = None + + + class Error(BaseModel): + code: int + message: str + + + class PetForm(BaseModel): + name: str | None = None + age: int | None = None + + + class PetsGetResponse(BaseModel): + __root__: list[Pet] + ``` + +--- + ## `--openapi-scopes` {#openapi-scopes} Specify OpenAPI scopes to generate (schemas, paths, parameters). diff --git a/docs/cli-reference/quick-reference.md b/docs/cli-reference/quick-reference.md index f63b388ac..1cf654c8c 100644 --- a/docs/cli-reference/quick-reference.md +++ b/docs/cli-reference/quick-reference.md @@ -155,6 +155,7 @@ datamodel-codegen [OPTIONS] | Option | Description | |--------|-------------| | [`--include-path-parameters`](openapi-only-options.md#include-path-parameters) | Include OpenAPI path parameters in generated parameter models. | +| [`--openapi-include-paths`](openapi-only-options.md#openapi-include-paths) | Filter OpenAPI paths to include in model generation. | | [`--openapi-scopes`](openapi-only-options.md#openapi-scopes) | Specify OpenAPI scopes to generate (schemas, paths, parameters). | | [`--read-only-write-only-model-type`](openapi-only-options.md#read-only-write-only-model-type) | Generate separate request and response models for readOnly/writeOnly fields. | | [`--use-operation-id-as-name`](openapi-only-options.md#use-operation-id-as-name) | Use OpenAPI operationId as the generated function/class name. | @@ -274,6 +275,7 @@ All options sorted alphabetically: - [`--no-use-specialized-enum`](typing-customization.md#no-use-specialized-enum) - Disable specialized Enum classes for Python 3.11+ code gener... - [`--no-use-standard-collections`](typing-customization.md#no-use-standard-collections) - Use typing.Dict/List instead of built-in dict/list for conta... - [`--no-use-union-operator`](typing-customization.md#no-use-union-operator) - Use Union[X, Y] / Optional[X] instead of X | Y union operato... +- [`--openapi-include-paths`](openapi-only-options.md#openapi-include-paths) - Filter OpenAPI paths to include in model generation. - [`--openapi-scopes`](openapi-only-options.md#openapi-scopes) - Specify OpenAPI scopes to generate (schemas, paths, paramete... - [`--original-field-name-delimiter`](field-customization.md#original-field-name-delimiter) - Specify delimiter for original field names when using snake-... - [`--output`](base-options.md#output) - Specify the destination path for generated Python code. diff --git a/src/datamodel_code_generator/__init__.py b/src/datamodel_code_generator/__init__.py index a75f5da13..de5777fab 100644 --- a/src/datamodel_code_generator/__init__.py +++ b/src/datamodel_code_generator/__init__.py @@ -739,6 +739,7 @@ def get_header_and_first_line(csv_file: IO[str]) -> dict[str, Any]: "openapi_scopes": config.openapi_scopes, "include_path_parameters": config.include_path_parameters, "use_status_code_in_response_name": config.use_status_code_in_response_name, + "openapi_include_paths": config.openapi_include_paths, **additional_options, } parser_config = _create_parser_config(OpenAPIParserConfig, config, openapi_additional_options) diff --git a/src/datamodel_code_generator/__main__.py b/src/datamodel_code_generator/__main__.py index 3c7025831..d1214103b 100644 --- a/src/datamodel_code_generator/__main__.py +++ b/src/datamodel_code_generator/__main__.py @@ -551,6 +551,7 @@ def validate_class_name_affix_scope(cls, v: str | ClassNameAffixScope | None) -> model_extra_keys_without_x_prefix: Optional[set[str]] = None # noqa: UP045 openapi_scopes: Optional[list[OpenAPIScope]] = [OpenAPIScope.Schemas] # noqa: UP045 include_path_parameters: bool = False + openapi_include_paths: Optional[list[str]] = None # noqa: UP045 wrap_string_literal: Optional[bool] = None # noqa: UP045 use_title_as_name: bool = False use_operation_id_as_name: bool = False @@ -928,6 +929,7 @@ def run_generate_from_config( # noqa: PLR0913, PLR0917 model_extra_keys_without_x_prefix=config.model_extra_keys_without_x_prefix, openapi_scopes=config.openapi_scopes, include_path_parameters=config.include_path_parameters, + openapi_include_paths=config.openapi_include_paths, wrap_string_literal=config.wrap_string_literal, use_title_as_name=config.use_title_as_name, use_operation_id_as_name=config.use_operation_id_as_name, diff --git a/src/datamodel_code_generator/_types/generate_config_dict.py b/src/datamodel_code_generator/_types/generate_config_dict.py index 0c441c3fc..f2f5fbe30 100644 --- a/src/datamodel_code_generator/_types/generate_config_dict.py +++ b/src/datamodel_code_generator/_types/generate_config_dict.py @@ -102,6 +102,7 @@ class GenerateConfigDict(TypedDict): model_extra_keys_without_x_prefix: NotRequired[set[str] | None] openapi_scopes: NotRequired[list[OpenAPIScope] | None] include_path_parameters: NotRequired[bool] + openapi_include_paths: NotRequired[list[str] | None] graphql_scopes: NotRequired[list[GraphQLScope] | None] wrap_string_literal: NotRequired[bool | None] use_title_as_name: NotRequired[bool] diff --git a/src/datamodel_code_generator/_types/parser_config_dicts.py b/src/datamodel_code_generator/_types/parser_config_dicts.py index 7694b777e..a96413eaa 100644 --- a/src/datamodel_code_generator/_types/parser_config_dicts.py +++ b/src/datamodel_code_generator/_types/parser_config_dicts.py @@ -162,6 +162,7 @@ class OpenAPIParserConfigDict(JSONSchemaParserConfigDict): openapi_scopes: NotRequired[list[OpenAPIScope] | None] include_path_parameters: NotRequired[bool] use_status_code_in_response_name: NotRequired[bool] + openapi_include_paths: NotRequired[list[str] | None] ModelDict: TypeAlias = ParserConfigDict | GraphQLParserConfigDict | JSONSchemaParserConfigDict | OpenAPIParserConfigDict diff --git a/src/datamodel_code_generator/arguments.py b/src/datamodel_code_generator/arguments.py index f65e6d7e4..ee52e152a 100644 --- a/src/datamodel_code_generator/arguments.py +++ b/src/datamodel_code_generator/arguments.py @@ -924,6 +924,18 @@ def start_section(self, heading: str | None) -> None: action="store_true", default=None, ) +openapi_options.add_argument( + "--openapi-include-paths", + nargs="+", + metavar="PATTERN", + help=( + "Include only OpenAPI paths matching fnmatch patterns. " + "Use wildcards: '*' matches any chars, '?' matches single char. " + "Example: '/users/*' '/products'. " + "Requires '--openapi-scopes' to include 'paths'." + ), + default=None, +) openapi_options.add_argument( "--validation", help="Deprecated: Enable validation (Only OpenAPI). this option is deprecated. it will be removed in future " diff --git a/src/datamodel_code_generator/cli_options.py b/src/datamodel_code_generator/cli_options.py index 3929caf8e..611bb7672 100644 --- a/src/datamodel_code_generator/cli_options.py +++ b/src/datamodel_code_generator/cli_options.py @@ -236,6 +236,7 @@ class CLIOptionMeta: name="--read-only-write-only-model-type", category=OptionCategory.OPENAPI ), "--include-path-parameters": CLIOptionMeta(name="--include-path-parameters", category=OptionCategory.OPENAPI), + "--openapi-include-paths": CLIOptionMeta(name="--openapi-include-paths", category=OptionCategory.OPENAPI), "--validation": CLIOptionMeta( name="--validation", category=OptionCategory.OPENAPI, diff --git a/src/datamodel_code_generator/config.py b/src/datamodel_code_generator/config.py index 836fdcacc..f070ea560 100644 --- a/src/datamodel_code_generator/config.py +++ b/src/datamodel_code_generator/config.py @@ -140,6 +140,7 @@ class Config: model_extra_keys_without_x_prefix: set[str] | None = None openapi_scopes: list[OpenAPIScope] | None = None include_path_parameters: bool = False + openapi_include_paths: list[str] | None = None graphql_scopes: list[GraphQLScope] | None = None wrap_string_literal: bool | None = None use_title_as_name: bool = False @@ -348,6 +349,7 @@ class OpenAPIParserConfig(JSONSchemaParserConfig): openapi_scopes: list[OpenAPIScope] | None = None include_path_parameters: bool = False use_status_code_in_response_name: bool = False + openapi_include_paths: list[str] | None = None class ParseConfig(BaseModel): diff --git a/src/datamodel_code_generator/parser/openapi.py b/src/datamodel_code_generator/parser/openapi.py index 89310553c..cc7bb328f 100644 --- a/src/datamodel_code_generator/parser/openapi.py +++ b/src/datamodel_code_generator/parser/openapi.py @@ -6,6 +6,7 @@ from __future__ import annotations +import fnmatch import re from collections import defaultdict from contextlib import nullcontext @@ -208,6 +209,12 @@ def __init__( self.open_api_scopes: list[OpenAPIScope] = self.config.openapi_scopes or [OpenAPIScope.Schemas] self.include_path_parameters: bool = self.config.include_path_parameters self.use_status_code_in_response_name: bool = self.config.use_status_code_in_response_name + self.openapi_include_paths: list[str] | None = self.config.openapi_include_paths + if self.openapi_include_paths and OpenAPIScope.Paths not in self.open_api_scopes: + warn( + "--openapi-include-paths has no effect without --openapi-scopes paths", + stacklevel=2, + ) self._discriminator_schemas: dict[str, dict[str, Any]] = {} self._discriminator_subtypes: dict[str, list[str]] = defaultdict(list) @@ -338,6 +345,25 @@ def _parse_schema_or_ref( self.resolve_ref(schema.ref) return self.get_ref_data_type(schema.ref) + def _normalize_path(self, path: str) -> str: # noqa: PLR6301 + """Normalize path for consistent matching. + + Note: This is an instance method (not static) due to the snooper_to_methods + class decorator which does not preserve staticmethod descriptors. + """ + if not path.startswith("/"): + path = f"/{path}" + return path + + def _matches_path_pattern(self, path: str) -> bool: + """Check if path matches any of the include patterns.""" + if not self.openapi_include_paths: + return True + normalized_path = self._normalize_path(path) + return any( + fnmatch.fnmatch(normalized_path, self._normalize_path(pattern)) for pattern in self.openapi_include_paths + ) + def _process_path_items( # noqa: PLR0913 self, items: dict[str, dict[str, Any]], @@ -347,10 +373,13 @@ def _process_path_items( # noqa: PLR0913 security: list[dict[str, list[str]]] | None, *, strip_leading_slash: bool = True, + apply_path_filter: bool = True, ) -> None: """Process path or webhook items with operations.""" scope_path = [*base_path, f"#/{scope_name}"] for item_name, methods_ in items.items(): + if apply_path_filter and not self._matches_path_pattern(item_name): + continue item_ref = methods_.get("$ref") if item_ref: methods = self.get_ref_model(item_ref) @@ -716,7 +745,9 @@ def parse_raw(self) -> None: # noqa: PLR0912 if OpenAPIScope.Webhooks in self.open_api_scopes: webhooks: dict[str, dict[str, Any]] = specification.get("webhooks", {}) - self._process_path_items(webhooks, path_parts, "webhooks", [], security, strip_leading_slash=False) + self._process_path_items( + webhooks, path_parts, "webhooks", [], security, strip_leading_slash=False, apply_path_filter=False + ) if OpenAPIScope.RequestBodies in self.open_api_scopes: request_bodies: dict[str, Any] = specification.get("components", {}).get("requestBodies", {}) diff --git a/src/datamodel_code_generator/prompt_data.py b/src/datamodel_code_generator/prompt_data.py index 90343322c..0a6224c51 100644 --- a/src/datamodel_code_generator/prompt_data.py +++ b/src/datamodel_code_generator/prompt_data.py @@ -79,6 +79,7 @@ "--no-use-specialized-enum": "Disable specialized Enum classes for Python 3.11+ code generation.", "--no-use-standard-collections": "Use typing.Dict/List instead of built-in dict/list for container types.", "--no-use-union-operator": "Use Union[X, Y] / Optional[X] instead of X | Y union operator.", + "--openapi-include-paths": "Filter OpenAPI paths to include in model generation.", "--openapi-scopes": "Specify OpenAPI scopes to generate (schemas, paths, parameters).", "--original-field-name-delimiter": "Specify delimiter for original field names when using snake-case conversion.", "--output": "Specify the destination path for generated Python code.", diff --git a/tests/data/expected/main/input_model/config_class.py b/tests/data/expected/main/input_model/config_class.py index 654c0865e..d4b6d2e1a 100644 --- a/tests/data/expected/main/input_model/config_class.py +++ b/tests/data/expected/main/input_model/config_class.py @@ -175,6 +175,7 @@ class GenerateConfig(TypedDict): model_extra_keys_without_x_prefix: NotRequired[set[str] | None] openapi_scopes: NotRequired[list[OpenAPIScope] | None] include_path_parameters: NotRequired[bool] + openapi_include_paths: NotRequired[list[str] | None] graphql_scopes: NotRequired[list[GraphQLScope] | None] wrap_string_literal: NotRequired[bool | None] use_title_as_name: NotRequired[bool] diff --git a/tests/data/expected/main/openapi/openapi_include_paths/pets_only.py b/tests/data/expected/main/openapi/openapi_include_paths/pets_only.py new file mode 100644 index 000000000..5c771c576 --- /dev/null +++ b/tests/data/expected/main/openapi/openapi_include_paths/pets_only.py @@ -0,0 +1,27 @@ +# generated by datamodel-codegen: +# filename: body_and_parameters.yaml +# timestamp: 2019-07-26T00:00:00+00:00 + +from __future__ import annotations + +from pydantic import BaseModel + + +class Pet(BaseModel): + id: int + name: str + tag: str | None = None + + +class Error(BaseModel): + code: int + message: str + + +class PetForm(BaseModel): + name: str | None = None + age: int | None = None + + +class PetsGetResponse(BaseModel): + __root__: list[Pet] diff --git a/tests/main/openapi/test_main_openapi.py b/tests/main/openapi/test_main_openapi.py index 5a273239f..da8ab32a3 100644 --- a/tests/main/openapi/test_main_openapi.py +++ b/tests/main/openapi/test_main_openapi.py @@ -4687,3 +4687,63 @@ def test_query_parameters_with_model_config(output_file: Path) -> None: "--allow-population-by-field-name", ], ) + + +@pytest.mark.cli_doc( + options=["--openapi-include-paths"], + option_description="""Filter OpenAPI paths to include in model generation. + +The `--openapi-include-paths` flag allows filtering which paths are processed.""", + input_schema="openapi/body_and_parameters.yaml", + cli_args=["--openapi-scopes", "paths", "schemas", "--openapi-include-paths", "/pets*"], + golden_output="openapi/openapi_include_paths/pets_only.py", +) +def test_main_openapi_include_paths(output_file: Path) -> None: + """Filter OpenAPI paths to include in model generation. + + The `--openapi-include-paths` flag allows filtering which paths are processed. + """ + run_main_and_assert( + input_path=OPEN_API_DATA_PATH / "body_and_parameters.yaml", + output_path=output_file, + input_file_type="openapi", + assert_func=assert_file_content, + expected_file=EXPECTED_OPENAPI_PATH / "openapi_include_paths" / "pets_only.py", + extra_args=["--openapi-scopes", "paths", "schemas", "--openapi-include-paths", "/pets*"], + ) + + +def test_main_openapi_include_paths_without_leading_slash(output_file: Path) -> None: + """Test path pattern matching works without leading slash.""" + run_main_and_assert( + input_path=OPEN_API_DATA_PATH / "body_and_parameters.yaml", + output_path=output_file, + input_file_type="openapi", + assert_func=assert_file_content, + expected_file=EXPECTED_OPENAPI_PATH / "openapi_include_paths" / "pets_only.py", + extra_args=["--openapi-scopes", "paths", "schemas", "--openapi-include-paths", "pets*"], + ) + + +def test_main_openapi_include_paths_warning_without_paths_scope() -> None: + """Warn when --openapi-include-paths used without paths scope.""" + import warnings + + from datamodel_code_generator.__main__ import main + + with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") + main([ + "--input", + str(OPEN_API_DATA_PATH / "body_and_parameters.yaml"), + "--input-file-type", + "openapi", + "--openapi-scopes", + "schemas", + "--openapi-include-paths", + "/pets*", + ]) + warning_messages = [str(warning.message) for warning in w] + assert any( + "--openapi-include-paths has no effect without --openapi-scopes paths" in msg for msg in warning_messages + ) diff --git a/tests/main/test_public_api_signature_baseline.py b/tests/main/test_public_api_signature_baseline.py index a6aa2c3d4..161d130bd 100644 --- a/tests/main/test_public_api_signature_baseline.py +++ b/tests/main/test_public_api_signature_baseline.py @@ -121,6 +121,7 @@ def _baseline_generate( model_extra_keys_without_x_prefix: set[str] | None = None, openapi_scopes: list[OpenAPIScope] | None = None, include_path_parameters: bool = False, + openapi_include_paths: list[str] | None = None, graphql_scopes: list[GraphQLScope] | None = None, wrap_string_literal: bool | None = None, use_title_as_name: bool = False,