Skip to content

schema-tree: Null marker to array-of-arrays/objects/primitives/union - #1155

Open
HansAarneLiblik wants to merge 1 commit into
rapi-doc:masterfrom
HansAarneLiblik:Null-marker-to-array-of-arrays_objects_primitives_union
Open

HansAarneLiblik wants to merge 1 commit into
rapi-doc:masterfrom
HansAarneLiblik:Null-marker-to-array-of-arrays_objects_primitives_union

Conversation

@HansAarneLiblik

Copy link
Copy Markdown

Add null|markers to array properties. Also updates previously added null| markers for object properties

Fixes #952

For schema

Pet:
  type: object
  properties:
    primitive_array:
      type: array
      nullable: true
      items:
        type: string
    object_array:
      type: array
      nullable: true
      items:
        $ref: '#/components/schemas/Category'
    array_array_primitive:
      type: array
      nullable: true
      items:
        type: array
        items:
          type: string
    array_array_object:
      type: array
      nullable: true
      items:
        type: array
        items:
          $ref: '#/components/schemas/Category'
    anyof_array:
      type: array
      nullable: true
      items:
        anyOf:
          - type: string
          - $ref: '#/components/schemas/Category'

Before:

image

After:

image

@mrin9

mrin9 commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution !!!
But we have just restarted our work on this project and we are in a mid of some refactoring. I will take a look at your code. But you may have to fix the conflicts again. or i will extract the core logic and incorporate it once we are done with our refactoring cycle.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: handle nullable arrays (revive #919)

2 participants