Any use of oneOf currently fails to render the entire section it appears in, logging this message in the console several times:
Uncaught (in promise) TypeError: e['::metadata'] is undefined
This seems to have been working up to and including version 1.0.559, but broken in 1.0.561 and later.
Sample description file:
openapi: 3.1.0
info:
title: Example use of oneof breaking OpenAPI Explorer
components:
schemas:
example:
type: object
properties:
foo:
oneOf:
- type: int
description: Option one is an integer
- type: string
description: Option two is a string
HTML used to test:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Working with @1.0.559, broken with @1.0.561 or @1.0.564 -->
<script type="module" src="https://cdn.jsdelivr.net/npm/openapi-explorer@1.0.561/dist/browser/openapi-explorer.min.js"></script>
</head>
<body>
<openapi-explorer spec-url="/ws2/oneof-test.yaml"></openapi-explorer>
</body>
</html>
Cool thanks for Reporting and including an reproduction. I'm sure there is a simple fix to this. Feel free to provide a quick PR or someone will pick this up shortly.
Any use of
oneOf
currently fails to render the entire section it appears in, logging this message in the console several times:This seems to have been working up to and including version 1.0.559, but broken in 1.0.561 and later.
Sample description file:
HTML used to test: