Skip to content

subTypes not displayed in model #1526

@rpofuk

Description

@rpofuk

Hi!

I have service and model definition:
SERVICE:

"path" : "/process/start",
    "operations" : [ {
      "method" : "POST",
      "nickname" : "startProcess",
      "type" : "void",
      "parameters" : [ {
        "type" : "array",
        "items" : {
          "$ref" : "ProcessTaskDTO"
        },
        "paramType" : "body",
        "name" : "tasks",
        "required" : true
      }, {
        "type" : "string",
        "paramType" : "query",
        "name" : "token"
      } ],
      "consumes" : [ "application/json" ],
      "produces" : [ "application/json" ]
    } ]

MODEL:

"ProcessTaskDTO" : {
      "id" : "ProcessTaskDTO",
      "properties" : {
        "id" : {
          "type" : "string"
        },
        "type" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        }
      }, 
      "subTypes" : ["ProcessTaskDTO1", "ProcessTaskDTO2"],
      "discriminator": "type"
    },
    "ProcessTaskDTO1" : {
      "id" : "ProcessTaskDTO1",
      "properties" : {
        "name1" : {
          "type" : "string"
        }
      }
    },
    "ProcessTaskDTO2" : {
      "id" : "ProcessTaskDTO2",
      "properties" : {
        "name2" : {
          "type" : "string"
        }
      }
    },

But model is not displayed in UI:

image

Found issue #300 that's closed and it's related to response class. Is request model still an issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions