summaryrefslogtreecommitdiff
path: root/docs/technical/web.md
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-08-04 20:13:10 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-09-14 19:03:44 -0400
commit84ad8b2a92eac9155cada821c57d62a517b958a8 (patch)
tree5042330ea785c64ac1e45d05bdfb6cd22b098dde /docs/technical/web.md
parent5e8991bfcf7f287f595e858c34b8ac1a92c42b9b (diff)
downloadSMAPI-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.md10
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: