-
-
Notifications
You must be signed in to change notification settings - Fork 262
Description
Is your feature request related to a problem? Please describe.
There is a minimal example for described feature:
openapi: 3.0.1
info:
title: example
description: allOf example
version: 0.1.0
servers:
- url: 'https://example.com'
paths:
'/foo':
delete:
responses:
'200':
description: OK
components:
schemas:
Foo:
type: object
properties:
property1:
type: object
Bar:
type: object
properties:
property1:
type: array
items:
type: string
allOf:
- $ref: '#/components/schemas/Foo'It seems OpenAPI refers JSON Schema Specification Wright Draft 00. Which one refers The JavaScript Object Notation (JSON) Data Interchange Format. Which says:
The terms "object" and "array" come from the conventions of JavaScript.
As I understand,arrayis a subtype ofobjectin terms of JS. And seemsobjecttype may be overridden byarraytype.
Bar object does not generate due to a type mismatch. Seems, provided the specification is valid. Bar object should be generated with array type of property1 property.
Describe the solution you'd like
It seems another approach is required in function _process_properties. This place rejects several valid cases.