Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pjrpc/server/specs/openapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def _extract_errors_schema(
) -> tuple[dict[int, dict[str, Any]], dict[str, JsonSchema]]:
status_error_schema_map: dict[int, dict[str, Any]] = {}
component_schemas: dict[str, JsonSchema] = {}
component_name_prefix = method_metadata.component_name_prefix or f"{method.__module__}_"
component_name_prefix = method_metadata.component_name_prefix or f"{method.__module__.replace('.', '_')}_"

for status, errors in status_errors_map.items():
if result := self._extractor.extract_error_response_schema(
Expand All @@ -378,7 +378,7 @@ def _extract_request_schema(
method_metadata: MethodMetadata,
) -> tuple[MaybeSet[dict[str, Any]], dict[str, JsonSchema]]:
component_schemas: dict[str, JsonSchema] = {}
component_name_prefix = method_metadata.component_name_prefix or f"{method.__module__}_"
component_name_prefix = method_metadata.component_name_prefix or f"{method.__module__.replace('.', '_')}_"

request_schema: MaybeSet[dict[str, Any]] = UNSET
if params_schema := method_metadata.params_schema:
Expand Down Expand Up @@ -406,7 +406,7 @@ def _extract_response_schema(
errors: list[type[exceptions.TypedError]],
) -> tuple[MaybeSet[dict[str, Any]], dict[str, JsonSchema]]:
component_schemas: dict[str, JsonSchema] = {}
component_name_prefix = method_metadata.component_name_prefix or f"{method.__module__}_"
component_name_prefix = method_metadata.component_name_prefix or f"{method.__module__.replace('.', '_')}_"

response_schema: MaybeSet[dict[str, Any]] = UNSET
if result_schema := method_metadata.result_schema:
Expand Down