Skip to content

Rest call returns wrong datatype in MDL source #922

Description

@rbolt

Problem

Call Rest services gives wrong output datatypes if configured to return the following:

  • System.FileDocument, or an object that has System.FileDocument as generalization
  • System.HttpResponse or an object that has System.HttpResponse as generalization

MDL Output for FileDocument

Got:

$fileResponseGet = rest call get '{1}' with ({1} = $location)
    header '1' = $header
    auth basic $username password $password
    timeout 300
    returns String;  <-- WRONG OUPUT

Expected

$fileResponseGet = rest call get '{1}' with ({1} = $location)
    header '1' = $header
    auth basic $username password $password
    timeout 300
    returns System.FileDocument (or the fully qualified name of the specialization); <-- EXPECTED OUPUT

MDL Output for HttpResponse

Got

$httpResponseGet = rest call get '{1}' with ({1} = $location)
    header '1' = $header
    auth basic $username password $password
    timeout 300
    returns response; <-- WRONG OUPUT

Expected

$httpResponseGet = rest call get '{1}' with ({1} = $location)
    header '1' = $header
    auth basic $username password $password
    timeout 300
    returns System.HttpResponse (or the fully qualified name of the specialization); <-- EXPECTED OUPUT

MxCLI: v0.18.0
StudioPro: v11.12.3

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