RapiDoc icon indicating copy to clipboard operation
RapiDoc copied to clipboard

anyOf/oneOf incorrectly assume type: object

Open MartinKolarik opened this issue 2 years ago • 1 comments

resolvers:
  type: array
  items:
    oneOf:
      - type: string
        format: ipv4
      - type: string
        const: private

Renders incorrectly as an array of objects instead of an array of strings:

image

Similarly, a more basic example without using format:

resolvers:
  type: array
  description: A list of default DNS resolvers configured on the probe.
  items:
    oneOf:
      - type: string
      - type: integer

Should be an array of string | integer but is an array of objects:

image

image

MartinKolarik avatar May 01 '23 18:05 MartinKolarik

Btw in the first case, I'm also wondering if it wouldn't be better to render both type and format, e.g., string (ipv4) and string (const) or similar.

MartinKolarik avatar May 01 '23 18:05 MartinKolarik