SAP / abap-file-formats

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

GH Action: JSON data validation is not working properly #479

Closed albertmink closed 1 year ago

albertmink commented 1 year ago

The JSON data is obviously not valid for the given JSON Schema, see 'formatVersion' that is required but not provided https://github.com/SAP/abap-file-formats/blob/63a267d6e681ae452220c4cf7c1625ae36528ab7/file-formats/ntty/examples/z_aff_example_ntty.ntty.json#L1

albertmink commented 1 year ago

Object types containing other characters than [a-z] are not covered, e.g. https://github.com/SAP/abap-file-formats/tree/main/file-formats/scp1

albertmink commented 1 year ago

Todo:

albertmink commented 1 year ago

Reopened because the todo above.

schneidermic0 commented 1 year ago

The check due to #480 seems to work. However, the error message is hard to understand.

I suggest to change the error message to "JSON Example does not specify the field "formatVersion"".

Additionally, I would rename the check from "Validate JSON data" to "Validate JSON examples.

I'll create a PR