Dear Community,
I'm working with the QBM CompositionApi in a .NET Framework 4.8 project (C# 7.3). I have an endpoint defined like this:
apiBuilder.AddMethod(
Method.Define(DELEGATIONS_USER_ENDPOINT_URL)
.FromTable(DELEGATIONS_TABLE_NAME)
.WithDescription(DELEGATIONS_USER_ENDPOINT_DESCRIPTION)
.EnableRead()
.WithParameter(PARAM_VALIDFROM, typeof(string), isInQuery: true)
.WithParameter(PARAM_VALIDUNTIL, typeof(string), isInQuery: true)
.WithWhereClause((qr, baseWhereClause) => { /* ... */ })
.WithAllColumns()
);
(Where the upper case parameters passed are intialized as constants in another place in the code.)
The issue is that the endpoint does not return a schema via the .GetSchema() method in the generated imx-api-ccc API wrapper used by our Angular Web Portal. I have seen .WithSchema() used in some examples, but I am not sure how to apply it correctly in this context or what the best practices are for building the schema dynamically. Is there a way to ensure the schema is available for the frontend developer working on the portal? The endpoint returns the schema correctly in postman, but in the web portal it results in the following error:
2025-06-18T10:35:40.295Z ERROR [main.js:62948] Error: Uncaught (in promise):
TypeError: Cannot read properties of undefined (reading 'GetSchema')
TypeError: Cannot read properties of undefined (reading 'GetSchema')
It does not necessarily have to be a dynamic schema, a static schema would also be acceptable if that is easier to implement. Any guidance or examples on how to expose the schema properly for frontend consumption would be greatly appreciated.
Thanks a lot!
Kind Regards
Nikolai