You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The end product of all those yaml files is a big json file, so using yaml isn't a hard requirement, and yet another syntax to learn (the only other place where we use yaml in inventaire is docker compose files).
Replacing yaml by js would have in particular the following advantages:
JS capabilities would make some files easier to maintain. For example, this line:
x-example: "{\n\"entries\": [\n {\n\"edition\": [\n {\n\"isbn\": \"979-10-209-0050-0\",\n\"claims\": {\n\"wdt:P1476\": \"Aimer à en perdre la raison\",\n\"wdt:P123\": \"wd:Q3236382\",\n\"wdt:P577\": \"2013-03-20\"\n },\n\"image\": \"http://www.editionslesliensquiliberent.fr/images/livre_affiche_355.png\"\n }\n ],\n\"works\": [\n {\n\"labels\": {\n\"fr\": \"Aimer à en perdre la raison\"\n }\n }\n ],\n\"authors\": [\n {\n\"labels\": {\n\"fr\": \"Maryse Vaillant\"\n }\n }\n ]\n }\n ]\n}"
could become
'x-example': JSON.stringify({entries: [{edition: [{isbn: '979-10-209-0050-0',claims: {'wdt:P1476': 'Aimer à en perdre la raison','wdt:P123': 'wd:Q3236382','wdt:P577': '2013-03-20'},image: 'http://www.editionslesliensquiliberent.fr/images/livre_affiche_355.png'}],works: [{labels: {fr: 'Aimer à en perdre la raison'}}],authors: [{labels: {fr: 'Maryse Vaillant'}}]}]})
much easier to read and edit.
use the familiar CommonJS require instead of yaml $ref
This could also open the possibility to build or assist the maintenance of this documentation by using the server code, for instance if we were to export controllers sanitization objects
The text was updated successfully, but these errors were encountered:
The end product of all those yaml files is a big json file, so using yaml isn't a hard requirement, and yet another syntax to learn (the only other place where we use yaml in inventaire is docker compose files).
Replacing yaml by js would have in particular the following advantages:
could become
much easier to read and edit.
require
instead of yaml$ref
This could also open the possibility to build or assist the maintenance of this documentation by using the server code, for instance if we were to export controllers sanitization objects
The text was updated successfully, but these errors were encountered: