Skip to content

Multi-level allOf does not show #532

Open
@tyteen4a03

Description

@tyteen4a03

I have the following setup:

paths:
  /objects:
    post:
      operationId: addObject
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Obj'
components:
    schemas:
        Id:
            type: integer
            format: int64
            description: The ID of the object.
            example: 10765432100123456789
            readOnly: true
        IdString:
            type: string
            description: The ID of the object, in string format (for JavaScript)
            example: "10765432100123456789"
            readOnly: true
        IdObject:
            type: object
            description: Describes an object containing an ID.
            required:
            - Id
            properties:
            Id:
                $ref: '#/components/schemas/Id'
                readOnly: true
            IdString:
                $ref: '#/components/schemas/IdString'
                readOnly: true
        Obj:
            allOf:
            - $ref: '#/components/schemas/ObjCompact'
            - $ref: '#/components/schemas/ObjExtended'
        ObjCompact:
            allOf:
            - $ref: '#/components/schemas/IdObject'
            - type: object
                required:
                - Name
                properties:
                Name:
                    type: string
                    description: The name of the object.
                    example: ServerName01

In this schema, the properties in the ID object do not show in the final request body of /objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    openapiQuestions about specification, validity, and edge cases

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions