diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-08-04 20:13:10 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 19:03:44 -0400 |
commit | 84ad8b2a92eac9155cada821c57d62a517b958a8 (patch) | |
tree | 5042330ea785c64ac1e45d05bdfb6cd22b098dde /docs/technical/web.md | |
parent | 5e8991bfcf7f287f595e858c34b8ac1a92c42b9b (diff) | |
download | SMAPI-84ad8b2a92eac9155cada821c57d62a517b958a8.tar.gz SMAPI-84ad8b2a92eac9155cada821c57d62a517b958a8.tar.bz2 SMAPI-84ad8b2a92eac9155cada821c57d62a517b958a8.zip |
fix manifest error if neither EntryDll nor ContentPackFor are specified (#654)
Diffstat (limited to 'docs/technical/web.md')
-rw-r--r-- | docs/technical/web.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/technical/web.md b/docs/technical/web.md index 9884fefc..0d2039d8 100644 --- a/docs/technical/web.md +++ b/docs/technical/web.md @@ -29,13 +29,21 @@ format, with some special properties: * The root schema may have a `@documentationURL` field, which is the URL to the user-facing documentation for the format (if any). * Any part of the schema can define an `@errorMessages` field, which specifies user-friendly errors - which override the auto-generated messages. These are indexed by error type. For example: + which override the auto-generated messages. These can be indexed by error type: ```js "pattern": "^[a-zA-Z0-9_.-]+\\.dll$", "@errorMessages": { "pattern": "Invalid value; must be a filename ending with .dll." } ``` + ...or by error type and a regular expression applied to the default message (not recommended + unless the previous form doesn't work, since it's more likely to break in future versions): + ```js + "@errorMessages": { + "oneOf:valid against no schemas": "Missing required field: EntryDll or ContentPackFor.", + "oneOf:valid against more than one schema": "Can't specify both EntryDll or ContentPackFor, they're mutually exclusive." + } + ``` You can also reference these schemas in your JSON file directly using the `$schema` field, for text editors that support schema validation. For example: |