Skip to content

Does not convert "type: null" correctly in most common use case.  #21

Closed
@dskvr

Description

@dskvr

Written in yaml because json is exhausting

someObject: 
  type: object 
  property: 
    nullableProperty: 
      oneOf:
        - type: "null"
        - type: object 
          properties: 
            yay: 
              type: string 

Resulting output (Incorrect )

someObject: 
  type: object 
  property: 
    nullableProperty: 
      oneOf:
        - nullable: true
        - type: object 
          properties: 
            yay: 
              type: string 

Expected Output (correct)

someObject: 
  type: object 
  property: 
    nullableProperty: 
      type: object 
      nullable: true
      properties: 
        yay: 
          type: string 

While this will validate (loosely) against Swagger 3.0 specification, it will indeed break code generators.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions