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 configuration-schema.json #25

Open
josephjclark opened this issue Oct 14, 2022 · 0 comments
Open

validate configuration-schema.json #25

josephjclark opened this issue Oct 14, 2022 · 0 comments
Labels
tooling Related to the builds and tooling

Comments

@josephjclark
Copy link
Collaborator

josephjclark commented Oct 14, 2022

We should add a step somewhere in the build process to report an error if configuration-schema.json isn't found.

This will need designing. Not all adaptors have a credential schema so maybe it's a warning rather than an error.

This could be a build step in the build tools simply to check if the schema exists.

Alternatively, we could introduce a new validation tool (and this is probably where I lean, but with caveats). This could analyse either a built tarball or an adaptor's source. It should report on things like whether the adaptor has an ast.json, a docs folder and a configuration-schema.json. Maybe it could validate the package.json to ensure a standard build script etc.

In practice I'm a bit worried about this... what if there's an ast.json but it's an empty array because there's little or no jsdoc? What about packages which just don't have the schema yet? Should it throw warnings or prevent a build, merge or even release of the adaptor? Is this not just a human level thing to check in a PR before merging? In which case it's solved by #14.

It's probably more important to check that, if a schema file does exist in the repo, it also exists in the built tarball. Which points to a validation tool which runs on the built package. Which would be neat!

Simple ast already does a bunch of validation on docs. Could it inherit the responsibility?

@taylordowns2000 taylordowns2000 added the tooling Related to the builds and tooling label Oct 19, 2022
@taylordowns2000 taylordowns2000 changed the title validate credential-schema.json validate configuration-schema.json Oct 21, 2022
@taylordowns2000 taylordowns2000 changed the title validate configuration-schema.json validate configuration-schema.json Oct 21, 2022
@taylordowns2000 taylordowns2000 moved this to Icebox in v2 Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Related to the builds and tooling
Projects
Status: Icebox
Development

No branches or pull requests

2 participants