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

JSON $schema #14

Closed albertmink closed 3 years ago

albertmink commented 3 years ago

We have to clarify what $schema we are refering to in the serialized files:

See: https://github.com/SAP/abap-file-formats/pull/11#discussion_r599407860

schneidermic0 commented 3 years ago

Now, I have got your point. This is a good question. I guess we should start with the second one. Any further opinions?

Christopher-Hermann commented 3 years ago

I also prefer the second approach.

xtough commented 3 years ago

Neither the 1st, nor the 2nd approach. 1st is obviously not a valid URL, it will always yield 404. 2nd is a moving target, because blob/main may change from one minute to the next. At least for instances of these JSON Schemas, I would prefer a stable URL like https://github.com/SAP/abap-file-formats/release/1.2.3/file-formats/clas/clas.json and for the schema ID itself something like https://github.com/SAP/abap-file-formats/release/latest/file-formats/clas/clas.json We should look into GitHub Tags and Releases at https://docs.github.com/en/github/administering-a-repository/linking-to-releases

albertmink commented 3 years ago

Good input and yes, we should avoid using moving targets :sweat_smile:

So, once there is a release/tag release_v.1, we can use https://github.com/SAP/abap-file-formats/blob/release_v.1/file-formats/clas/clas.json instead the blob/main.

albertmink commented 3 years ago

Once we have published the repo, urls like https://raw.githubusercontent.com/SAP/abap-file-formats/main/file-formats/clas/clas.json would work and open the file as it is. Tagging by release/tag is preserved. To me, this seams like the natural choice.