Skip to content

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

@haulmont-git

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

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