redoc: Properties on the same level as anyOf/oneOf/... are missing and anyOf merge is illogical
If I specify a schema for an object, which has properties and in addition some optional schemas it could conform to, the properties are not shown.
Example:
openapi: 3.0.2
info:
title: Example
version: 0.4.0
paths:
'/example':
get:
responses:
'200':
description: 'cube:properties is not shown in the schema'
content:
application/json:
schema:
type: object
required:
- 'cube:dimensions'
properties:
'cube:dimensions':
type: object
oneOf:
- title: Spatial Dimension
type: object
- title: Temporal Dimension
type: object
anyOf:
- $ref: '#/components/schemas/collection_eo'
- $ref: '#/components/schemas/collection_sar'
- $ref: '#/components/schemas/collection_sci'
components:
schemas:
collection_eo:
type: object
format: eo
collection_sar:
type: object
format: sar
collection_sci:
type: object
format: sci
I would cube:dimensions expect to show up in ReDoc as it does in Swagger Editor:

Tested with ReDoc standalone version 2.0.0-rc.2
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (13 by maintainers)
@RomanGotsiy Thank you very much! I highly appreciate the work you do here as it far exceeds the usual level of support open-source projects receive!
Indeed, I don’t know why I thought it means zero or more. Sorry about the wrong information. So merging is valid for anyOf, allOf and oneOf and works well. Just tested it with rc3.
@m-mohr oh. Sorry for the delay. This is just a complex issue which takes a lot of mental efforts to just understand it. So that’s why I’m delaying it…
I will try to look into it tomorrow but can’t promise anything.