Skip to content

Commit 7f1c5ce

Browse files
Fix various API issues after orval migration (#632)
1 parent 8dad0be commit 7f1c5ce

6 files changed

Lines changed: 950 additions & 179 deletions

File tree

src/scripts/export_openapi.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ def main():
5555
# Generate OpenAPI spec
5656
openapi_spec = app.openapi()
5757

58+
# Explicitly set explode=True for all array query parameters.
59+
# OpenAPI 3 implies explode=True by default for query params, but orval's
60+
# fetch client generator only honors it when explicitly present in the spec.
61+
for path_item in openapi_spec.get('paths', {}).values():
62+
for operation in path_item.values():
63+
if not isinstance(operation, dict):
64+
continue
65+
for param in operation.get('parameters', []):
66+
if param.get('in') == 'query' and param.get('schema', {}).get('type') == 'array':
67+
param.setdefault('explode', True)
68+
5869
# Format JSON
5970
indent = 2 if args.pretty else None
6071
json_output = json.dumps(openapi_spec, indent=indent)

0 commit comments

Comments
 (0)