linkedin / rest.li

Rest.li is a REST+JSON framework for building robust, scalable service architectures using dynamic discovery and simple asynchronous APIs.
rest.li
Other
2.51k stars 546 forks source link

keys starting with numeric string are throwing the following exception while generating PDL schema #795

Open satsrini opened 2 years ago

satsrini commented 2 years ago

Hi Team, We use the maven repo https://mvnrepository.com/artifact/com.linkedin.pegasus/data/27.7.18.

Keys starting with numeric string are throwing the following exception while generating PDL schema.

Exception in thread "main" java.lang.IllegalArgumentException: 1,93: "00100030" is an invalid field name.

at com.linkedin.data.template.DataTemplateUtil.parseSchema(DataTemplateUtil.java:313)
at com.linkedin.data.template.DataTemplateUtil.parseSchema(DataTemplateUtil.java:291)

Details: We are trying to convert 'dicom' json data/schema to 'PDL'. 'dicom' data has lot of keys(string) that start with a numeral say "0020000D"

eg: { "0020000D": { "vr": "UI", "Value": [ "1.2.392.200036.9116.2.2.2.1762893313.1029997326.945873" ] } } Note: The complete dicom data file can be found https://dicom.nema.org/dicom/2013/output/chtml/part18/sect_F.4.html

But the "linkedin pegasus data" library does not allow keys which start with a number, eg "0020000D", while creating PDL schema.

Please let us know if you need more details

satsrini commented 2 years ago

Hi Team,

Can you please let us know any update on this defect please ?

Thanks Satish Srinivasan

evanw555 commented 2 years ago

@satsrini That's quite an old version of pegasus, please try using our newer versions, which can be found at https://linkedin.jfrog.io/artifactory/pegasus/