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

Suggest specifying mapping between registry and validation scripts in package.json #41

Open
palemieux opened this issue Jul 24, 2020 · 2 comments
Assignees

Comments

@palemieux
Copy link
Contributor

Currently the mapping is through file names:

const schemaFile = DATA_SCHEMA_PATH.replace("%s", name)

@radford-for-smpte
Copy link
Collaborator

@palemieux , what are you thoughts on the fact that the data file names must currently match both the JSON schema files and the validation files:

const DATA_SCHEMA_PATH = "src/main/schemas/%s.schema.json";
const DATA_VALIDATE_PATH = "src/main/scripts/%s.validate.js";

Additionally, the data file names implicitly dictate the path values at https://registry.isdcf.com/.

Is the thought to make all 3 of those mappings explicit in package.json?

@palemieux
Copy link
Contributor Author

Further thoughts:

  • hard-coding the location of the schemas and registry files in validate.js is probably better than hard-coding them in package.json since (a) it is closer to the actual code and (b) clients are supposed to use validate.js to retrieve the registries and other exposed functions/structures.

  • validate.js should be renamed registries.js (or index.js or something more general) since it exposes more than validation methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants