-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Description
Hi there, i discovered this misbehavior
given schema:
openapi: 3.0.3
info:
title: Test
description: test
version: 1.0.0
servers:
- url: 'http://localhost:9000'
description: Local server
paths:
/test:
get:
parameters:
- name: env
in: path
schema:
type: string
enum: [prod, dev]
default: production
example: qa
responses:
'200':
description: 'ok'
content:
application/json:
schema:
allOf:
- type: object
properties:
theFoo:
allOf:
- type: object
- anyOf:
- type: object
properties:
foo:
type: string
- type: object
properties:
bar:
type: number
and markup:
<rapi-doc
id = "thedoc"
spec-url="./specs/temp.yaml"
allow-server-selection = "false"
show-header = "false"
show-info = "true"
theme = "light"
allow-try = "true"
sort-endpoints-by = "summary"
allow-api-list-style-selection = "false"
regular-font = 'Open Sans'
schema-style = 'tree'
render-style = 'focused'
default-schema-tab = "model"
schema-expand-level="1"
></rapi-doc>Settings schema-expand-level="1" and schema-style = 'tree' ends up in this:
In Schema Table everything works.
I have fixed this by changing
https://github.com/mrin9/RapiDoc/blob/master/src/components/schema-tree.js#L133
// From
if (data['::type'] === 'object') {
// To
if (data['::type'] === 'object' || (typeof data['::type'] === "string" && data['::type'].startsWith("xxx-of"))) {however i do not know whether it is correct solution.
I would be happy to see this fixed
kind regards
and thank you for a great tool!
Metadata
Metadata
Assignees
Labels
No labels
