itwinjs-core icon indicating copy to clipboard operation
itwinjs-core copied to clipboard

SchemaJsonLocater does not support async schema retrieval

Open RohitPtnkr1996 opened this issue 1 year ago • 2 comments

The async function getSchema() within SchemaJsonLocater internally calls getSchemaSync to get a schema. So, the function is not truly async.

To make the function async, we need to revisit the schema json loading and make that function async (which it currently isn't). Alternatively, we can create a new schema locater to specifically handle async operations.

RohitPtnkr1996 avatar Apr 26 '24 12:04 RohitPtnkr1996

Out of curiosity, why does this have the breaking change label?

grigasp avatar May 15 '24 07:05 grigasp

I had added it as a possible breaking change until we decide what approach to take. If we're creating a new async json loader. Or if we're updating the existing one, in which case the caller that gets the json will need to be async as well.

I'll update the label once I pick this up.

RohitPtnkr1996 avatar May 15 '24 10:05 RohitPtnkr1996