Server Module with both entities and Services : $model not showing both

Hi,
My X-data server was running correctly. The API.Server.Module had both Entities and services.
(I upgraded from Delphi Berlin to Delphi 10.4. So not sure if this is where the error was introduced.)
My server now either shows entities or services, but not both. Based on the line
XDataServer1.ModelName := AModelName;

=====================================================
In the result sets below the ModelName line was included. This results in my services being shown but not my entities.

** XDataServer1.ModelName := AModelName;**

http://localhost:2001/tms/xdata/oim/api
shows:
{
"value": []
}

and
http://localhost:2001/tms/xdata/oim/api/$model
shows my services but not my entities.
{
"Title": "Server API",
"Version": "2.0",
"Schemas": [
{
"Namespace": "XData.Default",
"EntityTypes": [],
"EntityContainers": [
{
"Name": "Default",
"EntitySets": []
}
],
"EnumTypes": [],
"Controllers": [
{
"Name": "SetPassService",
"Actions": [
{
"Name": "Reset",
"Parameters": [
{
"Name": "APassword",
"Input": true
}
],
"HttpMethod": "POST",
"OperationId": "ISetPassService.Reset"
},
{
"Name": "Verify",
"Parameters": [
{
"Name": "AOTP",
"Input": true
}
],
"HttpMethod": "POST",
"OperationId": "ISetPassService.Verify"
}
]
}
]
}
]
}

================================================
Code commented out

http://localhost:2001/tms/xdata/oim/api/
shows entities
{
"value": [
{
"name": "CertDefinition",
"url": "CertDefinition"
},
{
"name": "AuthUser",
"url": "AuthUser"
},
{
"name": "Country",
"url": "Country"
},
{
"name": "WebUser",
"url": "WebUser"
},
{
"name": "CertDoc",
"url": "CertDoc"
}
]
}

http://localhost:2001/tms/xdata/oim/api/$model
shows entities and OpenAPI Not my Services.
{
"Title": "Server API",
"Version": "2.0",
"Schemas": [
{
"Namespace": "XData.Default",
"EntityTypes": [
{
"Name": "CertDefinition",
"Properties": [
{
"Name": "CertDefId",
"Required": true,
"Type": "Int32"
},
...
...
..
],
"EnumTypes": [],
"Controllers": [
{
"Name": "openapi",
"Actions": [
{
"Name": "swagger.json",
"Parameters": [
{
"Name": "ExcludeEntities",
"BindingMode": "FromURI",
"Input": true,
"Type": "Boolean"
},
{
"Name": "ExcludeOperations",
"BindingMode": "FromURI",
"Input": true,
"Type": "Boolean"
}
],
"HttpMethod": "GET",
"IsResultStream": true,
"IsResultSingleObject": true,
"OperationId": "ICustomOpenApiService.SwaggerDocument"
}
]
}
]
}
]
}

============================================================
The full procedure is listed below.

procedure TApiServerModule.StartApiServer(ABaseUrl: string;
AModelName: string);
var
Url: string;
begin
RegisterOpenApiService;

Url := ABaseUrl;
if not Url.EndsWith('/') then
Url := Url + '/';
Url := Url + SERVER_PATH_SEGMENT;

XDataServer1.BaseUrl := Url;
// XDataServer1.ModelName := AModelName;

SparkleHttpSysDispatcher1.Start;
Logger.Log(Format('Api server module listening at "%s"', [Url]));
end;


Hoping you can shed some light in this regard.

Thank you.

How are your entity classes and services declared? My first guess is that simply you tagged your services with one model (or none) and entities with a different one.