hapi-server / servers

Catalogs of known HAPI servers
0 stars 4 forks source link

consider all.txt and dev.txt should be rewritten as json files with json schemas #15

Open jbfaden opened 10 months ago

jbfaden commented 10 months ago

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.

jbfaden commented 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.

rweigel commented 10 months ago

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.

jbfaden commented 9 months ago

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:

all.json dev.json

jbfaden commented 9 months ago

And here is a schema for the files:

servers-schema.json

rweigel commented 9 months ago

Where is that file in the repo?

jbfaden commented 9 months ago

I haven't put it in the repo. Maybe I should make a branch...

jbfaden commented 9 months ago

See https://github.com/hapi-server/servers/tree/20240105-issue15: all.json, dev.json, and servers-schema.json.

rweigel commented 9 months ago

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.

jbfaden commented 9 months ago

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.

jbfaden commented 9 months ago

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.)

rweigel commented 9 months ago

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.

jbfaden commented 9 months ago

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.