-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creation of a dependency to hold the defined route context/base template info #31
Comments
I think this idea could be extended to the full base template for a route file inlcuding name, description, points, etc. |
Do you mean creating a dereferentiabe context file in this project? It seems ok for me, could you create a draft proposal in a Pull request? |
I have been thinking about this for a little now and this is what I ment at the very beginning:
This file would be uploaded inside the repo for the applications to fetch with an URI. Then it would be parsed into memory and the generated object could be updated with data obtained from our applications. Then this object is serialized again using JSON.stringify(...) function to be saved to a json file. From here it can be uploaded to the POD or saved in the user's computer. Here is a sample of its usage:
Where parameter stringData is the data read from the file. Please, should there be anything unclear, let me know so I can provide further examples. |
It is taken for granted that if some other piece of information is needed, it can be appended to the object with a simple dictionary key access while leaving the standard route template untouched.
|
One thing came to my mind after reading @luispc1998 proposal on #22.
I have realised (as many of you surely) that such proposal's route files written in JSON-LD have to include the "@context" key with a specific value.
As it is something that is constant to all files following such pattern, I came with the idea of centralising that "@context" object into some sort of package/class/object/function thing, defining it as a dependency (say on npm for instance) associated with this repo/standard definition and using it from the apps that need it.
The reason for this is to avoid hardcoding such potentially living thing as this document is. This
would mean that whenever this standard evolves, so does the files produced by the applications using this resource. The only thing needed would be to update the dependency.
Although I don't have a clue on how this can be done yet, I will try to conduct a little research on the matter see if I can find something.
The text was updated successfully, but these errors were encountered: