Skip to content

[FEATURE] - Handle adaptation of returned values from run() when controller has a response schema #174

@cedricfrancoys

Description

@cedricfrancoys

Is your feature request related to a problem? Please describe.
Values returned by eQual::run() are just parsed using json_decode and randomly match ORM types.

Describe the solution you'd like
Values returned by eQual::run() should be adapted to corresponding types from Response Schema, if defined by target controller.

Describe alternatives you've considered
Parse schema are use the adapter service to adapt data according to their type.

public static function run($type, $controller, $body=[], $root=false) {
    $result = config\eQual::run($type, $controller, $body, $root);
    // #todo - adapt values if controller has a response schema
    $data = json_decode($result, true);
    // if result is not JSON, return raw data
    if(is_null($data)) {
        return $result;
    }
[...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions