swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

Home Page:http://swagger.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPI 3.1 broken reference to child class with oneOf reference

GooDer opened this issue · comments

Hi, I encountered another bug related to new OpenAPI 3.1 version.

When we have some object which's attribute is another object which is abstract and has at lease one implementation class it will not be rendered and error is displayed in swagger UI.

Version 3.0 output:
image

Version 3.1 output:
image

I found out that it is caused again by change in element class from ComposedSchema to JsonSchema.

I will try to provide fix also tomorrow.

Minimalistic project to reproduce:
swagger-core-bug.zip

Thank you @GooDer for reporting issue and providing fix PR. Closing ticket.