Skip to content

REST API doesn't allow returning collection of non-entity types for service invocation #9

Description

@haulmont-git

For service methods that return collection of non-entity types REST API checks that case and throws an exception from JSONConverter.processServiceMethodResult().

if (!checkCollectionItemTypes((Collection) result, Entity.class))
                throw new IllegalArgumentException("Items that are not instances of Entity found in service method result");

Whereas returning non-entity types (not wrapped in a collection) is allowed.
Returning a collection of non-entity types should be allowed as well.


Original issue: https://youtrack.haulmont.com/issue/PL-8131

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions