forked from Soroban-Pulse/SorobanPulse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix_openapi2.py
More file actions
14 lines (11 loc) · 801 Bytes
/
fix_openapi2.py
File metadata and controls
14 lines (11 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import re
with open('src/handlers.rs', 'r') as f:
c = f.read()
c = c.replace(
""" ("sort" = Option<String>, Query, description = "Sort order: asc (oldest first) or desc (newest first, default)"),
("topic_sym" = Option<String>, Query, description = "Filter by first topic symbol (uses topic_0_sym generated column index)"),""",
""" ("sort" = Option<String>, Query, description = "Sort order: asc (oldest first) or desc (newest first, default)"),
("sort_by" = Option<crate::models::SortBy>, Query, description = "Sort column: ledger (default), timestamp, or created_at"),
("topic_sym" = Option<String>, Query, description = "Filter by first topic symbol (uses topic_0_sym generated column index)"),""")
with open('src/handlers.rs', 'w') as f:
f.write(c)