diff --git a/changes/namespace-entry-schema.docs.md b/changes/namespace-entry-schema.docs.md new file mode 100644 index 0000000000..72f25b471d --- /dev/null +++ b/changes/namespace-entry-schema.docs.md @@ -0,0 +1 @@ +- State in the `rescript.json` schema that `namespace-entry` requires `namespace`, as `rescript` rejects it otherwise. diff --git a/docs/docson/build-schema.json b/docs/docson/build-schema.json index 21f48b1f22..4799b0548a 100644 --- a/docs/docson/build-schema.json +++ b/docs/docson/build-schema.json @@ -424,7 +424,7 @@ }, "namespace-entry": { "type": "string", - "description": "Name of the module that serves as the entry of a namespaced package. It is compiled without the namespace suffix, so other packages refer to it by its own name, and it opens the namespace to refer to the package's other modules. Only has an effect when `namespace` is enabled." + "description": "Name of the module that serves as the entry of a namespaced package. It is compiled without the namespace suffix, so other packages refer to it by its own name, and it opens the namespace to refer to the package's other modules. Requires `namespace`: `rescript` rejects a `namespace-entry` without a namespace." }, "sources": { "$ref": "#/definitions/sources", @@ -562,5 +562,15 @@ } }, "additionalProperties": false, - "required": ["name", "sources"] + "required": ["name", "sources"], + "dependencies": { + "namespace-entry": { + "required": ["namespace"], + "properties": { + "namespace": { + "not": { "enum": [false] } + } + } + } + } }