Open jbfaden opened 10 months ago
These files would also be copied over to hapi-server.org, so that https://hapi-server.org/all.json and https://hapi-server.org/dev.json would be the official guides. These could be validated before copying them over as well.
https://hapi-server.org/all.txt https://hapi-server.org/all_.txt https://hapi-server.org/dev.txt
are available using a reverse proxy from GitHub.
I propose these for all.json and dev.json. Bob, in the .txt files I saw an ID and a title which you use in https://hapi-server.org/servers, let me know if "id" and "title" are agreeable. The files:
And here is a schema for the files:
Where is that file in the repo?
I haven't put it in the repo. Maybe I should make a branch...
See https://github.com/hapi-server/servers/tree/20240105-issue15: all.json, dev.json, and servers-schema.json.
Regarding the schema, it seems that we agreed it should follow /about
and if the server is >= 3.0 we should only include the top-level URL in servers.json
and not duplicate info in their /about
response.
So I think the schema should be the same as /about
with the addition of url
, which points to http://server/hapi
.
I should have thought to look at the about schema. (Also I didn't realize/forgot there was already a ticket for this.) I'll make everything optional in this schema, so that a URL could be used. That said, I think it's worth considering having a copy of the about response, rather than a link, so that the server can be down and we still have a record of it.
I made tweaks to the schema:
https://github.com/hapi-server/servers/commit/96823f122c0de700a5cdba25fdb96060312a5bd6
I copied the descriptions from the about schema (https://github.com/hapi-server/data-specification-schema/blob/jon-jeremy-mess-3.0/3.0/about.json) and use contact for the email and contactID to replace the name. (It looks like /about doesn't have a place for the contact's name, just SPASE ID for example.)
If we copy the /about
and the the data provider changes something, user's will have stale info when they grab servers.json. This is why we decided to not duplicate. But if a server is down it would be nice to have an email address to show. So perhaps run a nightly process to update servers.json and include an x_LastUpdated for >=3.0 servers.
If you think of the copy on github (or https://hapi-server.org/all.json) as a cache of what's out there, then I think it's okay.
We should consider introducing all.json and dev.json which would replace all.txt and dev.txt. It seems strange that we didn't use json since it's self-documenting and supports schemas.