Skip to content

Commit

Permalink
fix: fix_swagger_for_generator
Browse files Browse the repository at this point in the history
  • Loading branch information
b4rtaz committed Jun 19, 2024
1 parent 63bc4d3 commit 4f1fc90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/generate/swagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def overwrite_host_url(swagger_json: dict, overwrite_host: str | None = None):

def fix_swagger_for_generator(swagger_json: dict):
# The generator doesn't support enums with number at the start (like "10m", "30m", etc)
if ('ohlcIntervalList' in swagger_json['components']['schemas']):
del swagger_json['components']['schemas']['ohlcIntervalList']['enum']
#if ('ohlcIntervalList' in swagger_json['components']['schemas']):
#del swagger_json['components']['schemas']['ohlcIntervalList']['enum']
pass

def remove_invalid_attributes(swagger_json: dict):
# 'default' is added in streams, but it's an invalid openapi specification
Expand Down

0 comments on commit 4f1fc90

Please sign in to comment.