Skip to content

Commit 8fbbfae

Browse files
committed
Add a small hack to be able to parse the latest spec
1 parent fd9fb81 commit 8fbbfae

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tools/validate_openapi_compatibility.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ def __init__(self):
554554
def parse(cls, json: dict):
555555
self = cls()
556556
for name, value in json.get("components", {}).get("schemas", {}).items():
557+
# These schemas are not meant to be part of the spec,
558+
# and are not referenced anywhere.
559+
# Seems like a waste of time to support them.
560+
if name in ["GetMetricsOut", "MetricOut"]:
561+
continue
562+
557563
self.components_schemas[name] = Schema.parse(value)
558564
for path, methods in json.get("paths", {}).items():
559565
for method, props in methods.items():

0 commit comments

Comments
 (0)