JSON Schema #4
PrettyGoodFreedomTech
started this conversation in
General
Replies: 2 comments
-
|
One more class of json schemas that I did not mention in the above post: each API, the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I am gathering all json schemas here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is a thread to discuss the role that json schema may play in the grapevine.
I anticipate using ajv validator to validate schemas. I've used it before and it's very widely used. Other options can be found at the json-schema website under tools.
Because of the grapevine's modular structure, there's going to be a lot of back and forth communication over APIs. Messages need to be formatted properly in json and validated. As of right now:
interpretationProtocolwill require its own json schema for the object used to encode and communicate adjustable interpretation protocol parameters over the Calculation / Interpretation API. These schemas will be stored in coreTable1 (interpretationProtocols) of the (interpretation engine db)[https://github.com/Pretty-Good-Freedom-Tech/grapevine-modular-structure/blob/main/interpretation-engine/nostr/database-initialization-core.sql]. These SAME schemas must also be stored in coreTable5_nostr (interpretationProtocols_nostr) of the calculation ending db.graperankProtocolin coreTable6 (grapeRankProtocols) of the calculation ending db will be associated with its own json schema. These schemas will eventually be communicated over the Endpoint API.Who decides on the proper format? Ultimately, your grapevine will decide. Until then, we will do it.
Where will we store the json schemas? They're going to change a lot, at least in the early days while we hammer out the protocols. I'm thinking the best solution is to store them in kind 3xxxx notes and address them by naddr. There will be one for each grapeRank Calculation Protocol and one for each Interpretation Protocol. (Any others?) So for starters, I'll probably use this discussion thread to maintain a list of all relevant naddrs. Ultimately, I will create a concept for json schemas using the concept graph protocol (once I get brainstorm.ninja refactored using the PGFT NRD Template and organize the relevant naddr's using that concept, which means I won't need this discussion thread anymore, you'll just look for the concept of json schemas and find the list there.
interpretation Protocol json schemas
One naddr is needed for each of the following:
These naddrs will be stored in the tables:
interpretationProtocols)parametersJsonSchemaNaddrinterpretationProtocols_nostr), col:parametersJsonSchemaNaddrgrapeRank Protocol json schemas
One naddr is needed for each of the following:
These naddrs will be stored in the table:
grapeRankProtocols), col:parametersJsonSchemaNaddrBeta Was this translation helpful? Give feedback.
All reactions