-
-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
Description
The SchemaProperties components just returns null if properties === undefined || !Object.keys(properties), that is, there is no element in properties. This affects every ui that uses asyncapi-react to render the document visually. For instance, here's a related issue asyncapi/studio#1223.
Expected result
patternProperties should be rendered regardless of whether there is an element in properties or not.
Actual result
patternProperties are not rendered when there is nothing to show in properties.
Steps to reproduce
use any ui that uses asyncapi-react, for example studio.asyncapi.com.
paste this schema in the editor:
asyncapi: 3.0.0
info:
title: Account Service
version: 1.0.0
components:
schemas:
Shadow:
type: object
properties:
id:
type: string
format: uuid
patternProperties:
"^[a-zA-Z0-9]+$":
type: string
Camera:
type: object
patternProperties:
"^[a-zA-Z0-9]+$":
type: string
You will see that patternProperties are rendered for Shadow but not for Camera.
Metadata
Metadata
Assignees
Labels
No labels