Lombiq / NodeJs-Extensions

Utilities and extensions for Node.js, used in ASP.NET (Core) MVC and Orchard (Core) CMS development.
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Use premade NPM package for JSON schema validation. (OSOE-406) #15

Open sarahelsaig opened 1 year ago

sarahelsaig commented 1 year ago

Followup to OSOE-84.

The validate-config.js script's purpose is schema validation. Instead of custom logic that's hard to maintain, let's use jsonschema and describe the valid states of our package file extension using JSON Schema.

The detected errors should be displayed as MSBuild errors using the handleErrorObject or handleErrorMessage functions from this repo (see OSOE-92)

Once done, we should review if we use custom JSON structures anywhere else and if so, create schemas for them as well.

Jira issue