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

Create schema specific to the version to validate

Open flo-dup opened this issue 1 year ago • 0 comments

Describe the current behavior

We use Suppliers.memoize to construct a Schema to validate a file against any iidm version

Describe the expected behavior

We use Suppliers.memoize with a map to construct a Schema to validate a file against a specific iidm version.

Describe the motivation

In the unit tests we know against which version the file should be validated, so there's no need to load all the schema for validating against a specific version.

A user might also need to check the file he's using is validating a specific version xsd.

With such a map we also reduce the memory cost of Suppliers.memoize, as only the validated versions would be loaded.

Extra Information

No response

flo-dup avatar Dec 04 '23 14:12 flo-dup