Mattias Sehlstedt 1eee6038df
Fixes so that a oneOf schema with a single sub-schema is simplified (#21043)
* Fixes so that a oneOf schema with a single sub-schema is simplified when SIMPLIFY_ONEOF_ANYOF is set to true

* Adjusts oneOf_array test to ensure that it is generated as an interface instead of being simplified

* Update ruby samples so that they no longer refer to a model that is now gone due to the schema being simplified
2025-04-26 22:53:21 +08:00

35 lines
696 B
YAML

openapi: 3.0.3
info:
title: oneOf with array inside
version: 1.0.0
servers:
- url: /
paths:
/myExample:
get:
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/_myExample_get_200_response'
description: Response
x-accepts:
- application/json
components:
schemas:
OneOf1:
example:
message1: message1
properties:
message1:
type: string
type: object
_myExample_get_200_response:
oneOf:
- items:
$ref: '#/components/schemas/OneOf1'
type: array
- $ref: '#/components/schemas/OneOf1'