mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
🔥 Removed versioning from json schema validation
refs https://github.com/TryGhost/Toolbox/issues/314 - With versioned API concept being dropped there's no need to rely on a specific version in validations either!
This commit is contained in:
parent
7252f03824
commit
d3f432f745
@ -10,8 +10,7 @@ const jsonSchema = require('@tryghost/admin-api-schema');
|
|||||||
*/
|
*/
|
||||||
const validate = async (apiConfig, frame) => await jsonSchema.validate({
|
const validate = async (apiConfig, frame) => await jsonSchema.validate({
|
||||||
data: frame.data,
|
data: frame.data,
|
||||||
schema: `${apiConfig.docName}-${apiConfig.method}`,
|
schema: `${apiConfig.docName}-${apiConfig.method}`
|
||||||
version: 'canary'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports.validate = validate;
|
module.exports.validate = validate;
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/node": "6.19.7",
|
"@sentry/node": "6.19.7",
|
||||||
"@tryghost/adapter-manager": "0.2.30",
|
"@tryghost/adapter-manager": "0.2.30",
|
||||||
"@tryghost/admin-api-schema": "2.17.0",
|
"@tryghost/admin-api-schema": "3.0.0",
|
||||||
"@tryghost/api-version-compatibility-service": "0.4.1",
|
"@tryghost/api-version-compatibility-service": "0.4.1",
|
||||||
"@tryghost/bookshelf-plugins": "0.4.1",
|
"@tryghost/bookshelf-plugins": "0.4.1",
|
||||||
"@tryghost/bootstrap-socket": "0.2.19",
|
"@tryghost/bootstrap-socket": "0.2.19",
|
||||||
|
@ -1719,10 +1719,10 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@tryghost/errors" "^1.2.1"
|
"@tryghost/errors" "^1.2.1"
|
||||||
|
|
||||||
"@tryghost/admin-api-schema@2.17.0":
|
"@tryghost/admin-api-schema@3.0.0":
|
||||||
version "2.17.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@tryghost/admin-api-schema/-/admin-api-schema-2.17.0.tgz#536efe5d0b6d6ff43805e5ad3a10b95102354150"
|
resolved "https://registry.yarnpkg.com/@tryghost/admin-api-schema/-/admin-api-schema-3.0.0.tgz#e0d091b75c95450baaefa7d40a80bab3aa15e47e"
|
||||||
integrity sha512-odbgzACnySa7//PiXmaUSMNkaNqzCIl1ya/cjfUAAN68UGRDI4MCAlK2lqqRFsvihrxxlV25lFJ8TwT1o5ji8w==
|
integrity sha512-F5eDQinVpew2jJMriQ0UrNegW4PWewK18ylbSGFRBax5EJPBY67A8g1nZpSmuC/gMArkIX4IVyyCtTniF6epvQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@tryghost/errors" "^1.0.0"
|
"@tryghost/errors" "^1.0.0"
|
||||||
lodash "^4.17.11"
|
lodash "^4.17.11"
|
||||||
|
Loading…
Reference in New Issue
Block a user