Skip to content

Commit 31da288

Browse files
authored
Update __main__.py
fix incorrect sorting
1 parent 7bf89ad commit 31da288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastapi_code_generator/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def generate_code(
180180
for tag in operation.tags:
181181
all_tags.append(tag)
182182
# Convert from Tag Names to router_names
183-
sorted_tags = sorted(set(all_tags))
183+
sorted_tags = sorted(set(all_tags), key=lambda x: x.lower())
184184
routers = sorted(
185185
[re.sub(TITLE_PATTERN, '_', tag.strip()).lower() for tag in sorted_tags]
186186
)

0 commit comments

Comments
 (0)