mirror of https://gitee.com/bigwinds/arangodb
Fix Foxx complaining about valid manifest.json $schema value (#7303)
* Fix manifest $schema schema * Remove unused argument * Add to CHANGELOG
This commit is contained in:
parent
c36c8c48ee
commit
787ed85e6a
|
@ -1,6 +1,8 @@
|
|||
devel
|
||||
-----
|
||||
|
||||
* fixed Foxx complaining about valid `$schema` value in manifest.json
|
||||
|
||||
* Foxx `req.makeAbsolute` now will return meaningful values when ArangoDB is using
|
||||
a unix socket endpoint. URLs generated when using a unix socket follow the format
|
||||
http://unix:<socket-path>:<url-path> used by other JS tooling.
|
||||
|
|
|
@ -40,7 +40,7 @@ configTypes.int = configTypes.integer;
|
|||
configTypes.bool = configTypes.boolean;
|
||||
|
||||
const manifestSchema = {
|
||||
$schema: joi.forbidden().allow(CANONICAL_SCHEMA).default(CANONICAL_SCHEMA),
|
||||
$schema: joi.only(CANONICAL_SCHEMA).default(CANONICAL_SCHEMA),
|
||||
// FoxxStore metadata
|
||||
name: joi.string().regex(/^[-_a-z][-_a-z0-9]*$/i).optional(),
|
||||
version: joi.string().optional(),
|
||||
|
@ -160,7 +160,7 @@ const manifestSchema = {
|
|||
)
|
||||
};
|
||||
|
||||
function checkManifest (filename, inputManifest, mount, complainAboutVersionMismatches) {
|
||||
function checkManifest (inputManifest, mount, complainAboutVersionMismatches) {
|
||||
const serverVersion = arangodb.plainServerVersion();
|
||||
const errors = [];
|
||||
const manifest = {};
|
||||
|
@ -380,7 +380,7 @@ function validateManifestFile (filename, mount, complainAboutVersionMismatches)
|
|||
);
|
||||
}
|
||||
try {
|
||||
mf = checkManifest(filename, mf, mount, complainAboutVersionMismatches);
|
||||
mf = checkManifest(mf, mount, complainAboutVersionMismatches);
|
||||
} catch (e) {
|
||||
throw Object.assign(
|
||||
new ArangoError({
|
||||
|
|
Loading…
Reference in New Issue