Open-Telecoms-Data/open-fibre-data-standard

Can we change $ref tag?

Opened this issue · 1 comments

Problem

Currently when we check out files locally and try to compile schema we actually use get the network-schema.json from GitHub. this may be unexpected and silent behaviour, leading someone to use the wrong files (they would expect local files to be used). The URL may not actually exist yet, causing problems.

Can we


--- a/schema/network-package-schema.json
+++ b/schema/network-package-schema.json
@@ -14,7 +14,7 @@
       "type": "array",
       "minItems": 1,
       "items": {
-        "$ref": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__3__0/schema/network-schema.json"
+        "$ref": "network-schema.json"
       }
     },
     "links": {

Or does that cause issues elsewhere, maybe showing docs on site? Maybe we could list competing demands here and see if there is a solution, something we can do during doc compile time?

I think that would be a good thing to do. I've pushed a branch to see how it behaves and there seems to be an issue with docson resolving references to definitions within the network schema: https://open-fibre-data-standard.readthedocs.io/en/package-schema-relative-ref/reference/publication_formats/json.html#small-files-and-api-responses-option

image

Based on the discussion in Planio-4097, I'd understood that using relative paths might cause issues for CoVE (and maybe Flatten Tool too?)