Apicurio / apicurio-studio

Open Source API Design
https://www.apicur.io/studio/
Apache License 2.0
988 stars 495 forks source link

oneOf/anyOf/allOf in request/response does not render #2049

Open zaiddabaeen opened 1 year ago

zaiddabaeen commented 1 year ago

Using "@apicurio/studio": "0.2.58", it seems that oneOf/anyOf/allOf is not rendered in the UI.

Such an operation:

patch:
    requestBody:
        content:
            application/json:
                schema:
                    oneOf:
                        -
                            $ref: '#/components/schemas/Cat'
                        -
                            $ref: '#/components/schemas/Dog'
    responses:
        '200':
            content:
                application/json:
                    schema:
                        oneOf:
                            -
                                $ref: '#/components/schemas/Cat'
                            -
                                $ref: '#/components/schemas/Dog'
            description: Updated

Does not show either the requestBody or the response body:

image

Complete API definition: https://pastebin.com/f9L2E4Mt

Is this expected? Or a bug?

EricWittmann commented 1 year ago

Currently inline schemas are not supported in the editor. It's a big miss, I know - but you can work around this by defining a named/reusable schema with the same definition and referring to it in the operation.