statisticsnorway / ssb-datadoc-model

Data Model for use in SSB's Metadata system
MIT License
0 stars 1 forks source link

The generated documentVersion in Java should be a constant #40

Open bjornandre opened 7 months ago

bjornandre commented 7 months ago

The model version is set correctly as a literal in the Python generated classes, e.g: https://github.com/statisticsnorway/ssb-datadoc-model/blob/main/generated/python/datadoc_model/datadoc_model/model.py#L162

However, the corresponding Java version is an Object, not a constant: https://github.com/statisticsnorway/ssb-datadoc-model/blob/main/generated/java/datadoc-model/src/main/java/no/ssb/dapla/metadata/PseudonymizationMetadata.java#L43

So there is no way to tell which schema version the Java object is generated from.

mmwinther commented 7 months ago

The tool we use to generate the Java classes doesn't support this unfortunately, ref https://github.com/joelittlejohn/jsonschema2pojo/issues/1001