Skip to content

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

Closed

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

Activity

  1. added
    ✨ enhancement
    on Jan 23, 2023
  2. added
    🍭 OpenAPI Compliance
    and removed
    ✨ enhancement
    on Aug 13, 2023
  3. locked and limited conversation to collaborators on Aug 13, 2023
  4. converted this issue into a discussion #802 on Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🍭 OpenAPI Compliance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions