Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate extension contributions against our JSON schemas #748

Open
5 tasks
tjcouch-sil opened this issue Jan 31, 2024 · 0 comments
Open
5 tasks

Validate extension contributions against our JSON schemas #748

tjcouch-sil opened this issue Jan 31, 2024 · 0 comments

Comments

@tjcouch-sil
Copy link
Member

tjcouch-sil commented Jan 31, 2024

User Story
As an extension developer, I want to have some level of intellisense and validation on my JSON contribution files so I can write them with confidence.

Description

We have some JSON files that extensions want to provide to contribute to the product in various ways. There are many validations JSON schema cannot do on these that we do in our TypeScript code, but JSON schema gives us validation on at least the overall shape of the data. We should enable extension developers to validate their JSON files against these schemas so they can write them with confidence:

  • Move any JSON schema documents that are currently objects within TypeScript files into their own files
  • Figure out sharing definitions across these JSON schema files so we can make a base schema file that has some helper definitions like localizeKey and id or stuff like that
  • Create a JSON schema for the extension manifest, generate TypeScript types for it, and set up the types so the extension service (and other relevant files) uses those types instead of the hand-written TypeScript ones
  • Set up the manifest.json to receive schema validation in VSCode in all relevant repositories (core, both templates, etc). Also potentially set up any other .json contribution docs we have in those repos to receive validation as well. Or maybe make some guesses as to what those would potentially be called. Like menu contributions could potentially be in assets/menus.json or something. Not sure this is worth doing.
  • Explain in appropriate readmes (template for example) about these JSON schemas and how to set up .json contribution documents to be validated on them
@tjcouch-sil tjcouch-sil converted this from a draft issue Jan 31, 2024
@tjcouch-sil tjcouch-sil moved this to 📮 Idea Bucket in Paranext Jan 31, 2024
@tjcouch-sil tjcouch-sil changed the title Move JSON schema(s) into .json files, reference across files, validate extension contributions Validate extension contributions against our JSON schemas Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📮 Idea Bucket
Development

No branches or pull requests

1 participant