Compile and enforce links JSON schema
For example, for each JSON type (category and subcategory):
name - mandatory, English only, no spaces
shortDescription - mandatory, single line
displayName - non empty string
etc.
That way we can avoid empty display names, bad initiative keys, etc. Can be easily enforced in PR build
There are several steps to this work item:
- Map all JSON fields (everything we ask in the form and/or used in the code) - specifically which are mandatory.
- Create JSON schema (can be easily done e.g. https://www.liquid-technologies.com/online-json-to-schema-converter)
- Complete all missing fields in current initiatives - this is a CONTENT task
- Enforce the schema in the PR build (very simple DevOps task)
In addition to PR validation, we can use this schema as our single source of truth:
- Generate
new_initiative.yml(locally, will need to commit along with each schema change) - Update form in CI/CD (via Google / MS form API)
- Use for ChatGPT function calling API
displayName shortDescription description article website url telegram whatsapp tiktok facebook instagram initiativeImage
@ohadschn is it completed?
No, and we'd need the exact schema in order to implement it. The list you provided above is partial and not detailed enough - for example it doesn't specify what props are required. Ideally we'd want something in this format: https://json-schema.org/understanding-json-schema