Skip to content

OpenAPI v3 - using $ref with list of data type #12

@lscalese

Description

@lscalese

Hi,

I noticed a problem with $ref and array usage :

components:
  schemas:
    TestDataTypes:
      type: object
      properties:
        refString:
          $ref: "#/components/schemas/RefDataType"
        listRefString:
          $ref: "#/components/schemas/RefListDataType"

    RefDataType:
      type: string
    
    RefListDataType:
      type: array
      items:
        $ref: "#/components/schemas/RefDataType"

The result is :

Class ztest.model.TestDataTypes Extends (%Persistent, %JSON.Adaptor, %XML.Adaptor) [ Inheritance = right, ProcedureBlock ]
{

Property listRefString As %VarString(MAXLEN = "");

Property refString As %String(MAXLEN = "");

}

and it should be :

Class ztest.model.TestDataTypes Extends (%Persistent, %JSON.Adaptor, %XML.Adaptor) [ Inheritance = right, ProcedureBlock ]
{

Property listRefString As List Of %String(MAXLEN = "");

Property refString As %String(MAXLEN = "");

}

I will fork and fix it as soon as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions