I'm using Core Service API to find all component schemas within a folder recursively.
This is the code.
OrganizationalItemItemsFilterData filter = new OrganizationalItemItemsFilterData();
filter.Recursive = true;
filter.ItemTypes = new[] { ItemType.Schema };
filter.SchemaPurposes = new[] { SchemaPurpose.Component };
IdentifiableObjectData[] results = client.GetList(folderTcm, filter);
When I execute this code the results include all kind of schemas, not only those which purpose is Component
.
I realized that if I set Recursive
property to false
or null
it works fine but of course without finding all schemas down through folders.
I've read the API reference but I can't find any place where it's said that SchemaPurposes
property can't work with Recursive
property in the same filter.
What am I doing wrong?
Edit:
I'm trying to retrieve component schemas inside a specific folder recursively excluding other types of schemas like embedded schemas or metadata schemas.