-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oneOf cases referencing external files are empty and recursive from the third case #723
Comments
Could you setup a minimal reproducible sample for this? |
It seems an Main file: openapi: 3.0.0
info:
version: 1.0.0
title: Test
paths:
/endpoint:
get:
responses:
'200':
content:
application/json:
schema:
oneOf:
- $ref: 'types.yaml#/Type1'
- $ref: 'types.yaml#/Type2'
- $ref: 'types.yaml#/Type3'
- $ref: 'types.yaml#/Type4'
- $ref: 'types.yaml#/Type5'
BaseType:
properties:
base:
type: string
Type1:
allOf:
- $ref: '#/BaseType'
- properties:
foo:
type: string
Type2:
allOf:
- $ref: '#/BaseType'
- properties:
bar:
type: string
Type3:
allOf:
- $ref: '#/BaseType'
- properties:
baz:
type: string
Type4:
allOf:
- $ref: '#/BaseType'
- properties:
qux:
type: string
Type5:
allOf:
- $ref: '#/BaseType'
- properties:
har:
type: string Behavior: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have the following response:
In
errors.yaml
I have defined the three types. They are, for all intents and purposes, identical. (I have even tried copying them from one another and only edited the name.)It seems that all
oneOf
cases from the third element are rendered as empty and recursive:The first two work fine, but no matter which order I put them in, the third one is rendered as shown above. The same goes for a fourth element that I tried adding.
The text was updated successfully, but these errors were encountered: