Skip to content

Feature: allow type=object field overriding with object using $ref in Schema object using allOf #720

@mtovt

Description

@mtovt

Is your feature request related to a problem? Please describe.
Minimal example for 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
    Boo:
      type: object
      properties:
        property2:
          type: string
          default: "default"
    Bar:
      type: object
      properties:
        property1:
          $ref: '#/components/schemas/Boo'
      allOf:
        - $ref: '#/components/schemas/Foo'

https://datatracker.ietf.org/doc/html/draft-wright-json-schema-00#section-7

it seems, Bar.property1 should be Boo object.

Bar object doesn't generate.

Describe the solution you'd like
It seems, _merge_properties cannot merge properties due to different properties in existing and new_prop (they represent the same object).

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions