aas-core-works / aas-core-codegen

Generate different implementations and schemas based on an AAS meta-model.
Other
19 stars 16 forks source link

Enhance Exception Messages with `shortID` for JSON Elements #496

Open Freezor opened 5 months ago

Freezor commented 5 months ago

Hi @mristin,

As I navigate through the project, I've noticed issues with exception messages in the AASX Server and package explorer. Currently, they indicate the node and line in JSON files where errors occur, but this can be challenging for large files and isn't very user-friendly. It would greatly improve usability if exception messages could also include the shortID of the failing JSON element.

Could you please share your thoughts on this idea? Do you know if this enhancement could be implemented quickly or where I should take a look to provide a PR for that feature?

Thank you!

mristin commented 5 months ago

Hi @Freezor , We implemented aas-core-codegen to be meta-model agnostig as meta-model changed fundamentally so many times. Most attributes and instances do not have a meaningful value-only path.

As far as I know, the value-only paths can not be generated automatically either. Your best bet is to manually map instances and attributes to value-only paths.

Btw., are you referring to serialization or to validation errors?

Freezor commented 5 months ago

Hi. I might get back to you on that, but it is concerning the deserialization. Maybe there is another solution for that