Skip to content

Commit ea12f97

Browse files
Merge pull request #44 from crossk3/kcross-patch-invalid-service-names
fix: stop generating invalid service module names
2 parents 86dc4b8 + 18b58c0 commit ea12f97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/openapi_python_generator/language_converters/python/service_generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from openapi_schema_pydantic import Schema
1717

1818
from openapi_python_generator.language_converters.python import common
19+
from openapi_python_generator.language_converters.python.common import normalize_symbol
1920
from openapi_python_generator.language_converters.python.jinja_config import JINJA_ENV
2021
from openapi_python_generator.language_converters.python.model_generator import (
2122
type_converter,
@@ -293,7 +294,7 @@ def generate_service_operation(
293294
)
294295

295296
if op.tags is not None and len(op.tags) > 0:
296-
so.tag = op.tags[0]
297+
so.tag = normalize_symbol(op.tags[0])
297298

298299
try:
299300
compile(so.content, "<string>", "exec")

0 commit comments

Comments
 (0)