muonsoft/openapi-mock

Always got empty items array for GET path array response with unique items

Closed this issue · 4 comments

Since merge of PR #12, I've always got an empty array returned from my GET endpoint path with unique items configured:

"/idds/{id}/invoices/{doctorsInvoiceNumber}/documents":
    get:
      summary: List of documents for an IDD specific invoice
      ...
    responses:
        "200":
          description: List of documents
          content:
            application/json:
              schema:
                type: array
                uniqueItems: true
                items:
                  $ref: "#/components/schemas/File"

Find full spec attached

@gschafra thank you. Can you give me a full specification? Or at least definition of #/components/schemas/File? I cannot reproduce an issue.

@strider2038: Find the specification here: REST_API_OAS3.zip. Maybe I just missed something. Many thanks in advanced!

@gschafra the problem is that File has type: object and it is detected as object without properties, not as combined type allOf. I will fix default behaviour of parser to detect combined types first.

File:
      description: File object
      type: object # <---
      allOf:

Issue fixed in v0.1.7