zklighter-perps 1.0.217 → 1.0.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ with open(FILE, "r") as f:
|
|
|
7
7
|
for path in data["paths"]:
|
|
8
8
|
methods = list(data["paths"][path].keys())
|
|
9
9
|
has_multiple_methods = len(methods) > 1
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
for method in methods:
|
|
12
12
|
if "api/v1/" in path:
|
|
13
13
|
base_name = path.split("api/v1/")[1].replace("/", "_")
|
|
@@ -87,10 +87,8 @@ with open(FILE, "r") as f:
|
|
|
87
87
|
if "hidden" in required_fields:
|
|
88
88
|
required_fields.remove("hidden")
|
|
89
89
|
|
|
90
|
-
if
|
|
91
|
-
|
|
92
|
-
else:
|
|
93
|
-
data["definitions"][path].pop("required", None)
|
|
90
|
+
if "approved_integrators" in required_fields:
|
|
91
|
+
required_fields.remove("approved_integrators")
|
|
94
92
|
|
|
95
93
|
if path == "Trade":
|
|
96
94
|
if "taker_fee" in required_fields:
|
|
@@ -99,5 +97,10 @@ with open(FILE, "r") as f:
|
|
|
99
97
|
if "maker_fee" in required_fields:
|
|
100
98
|
required_fields.remove("maker_fee")
|
|
101
99
|
|
|
100
|
+
if len(required_fields) > 0:
|
|
101
|
+
data["definitions"][path]["required"] = required_fields
|
|
102
|
+
else:
|
|
103
|
+
data["definitions"][path].pop("required", None)
|
|
104
|
+
|
|
102
105
|
with open(FILE, "w") as f:
|
|
103
106
|
json.dump(data, f, indent=2)
|