SAP / abap-file-formats

File formats that define and specify the file representation for ABAP development objects
MIT License
58 stars 55 forks source link

generated json, set uniqueItems to true for all arrays #120

Closed larshp closed 3 years ago

larshp commented 3 years ago

Hi, I think its safe to set uniqueItems for all arrays?

https://json-schema.org/understanding-json-schema/reference/array.html#uniqueness

schneidermic0 commented 3 years ago

Yes, I agree. I think we can add this to our schema generator. If we see that there are use cases for non-unique items we can react on this.

larshp commented 3 years ago

it's only possible for SAP to implement this issue, as the code for JSON generation is proprietary

larshp commented 3 years ago

actually, see https://github.com/SAP/abap-file-formats/pull/126, its not relevant for all internal tables, but if there is a unique key defined it should be okay to add uniqueItems

schneidermic0 commented 3 years ago

... but if there is a unique key defined it should be okay to add uniqueItems

Good point, thanks!

schneidermic0 commented 3 years ago

I have talked to the team, today. It agrees to add a uniqueItems.