Skip to content

SwaggerParser can't parse an array with allOf #488

@dentych

Description

@dentych

SwaggerParser is having troubles deserializing a definition that is of type array, and includes an allOf.

Example here:

swagger: "2.0"
info:
  description: "Stupid API"
  version: "1.0.0"
  title: "Swagger API"
host: "localhost"
basePath: "/"
schemes:
  - "http"
paths:
  '/what':
    get:
      summary: ok
      responses:
        200:
          description: "Success"
          schema:
            $ref: '#/definitions/AllOfArray'
definitions:
  Obj1:
    type: object
    properties:
      prop1:
        type: string
  AllOfArray:
    type: array
    items:
      allOf:
        - $ref: "#/definitions/Obj1"
        - properties:
            prop:
              type: string

The result is that AllOfArray comes out as an ArrayModel with no items.

Metadata

Metadata

Assignees

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