Browse Source

removed language service from schema

pull/936/head
Stephen Hess 8 years ago
parent
commit
99d6c6ba11
  1. 5
      schema.js
  2. 4
      test/unit/schema.js

5
schema.js

@ -37,11 +37,6 @@ module.exports = Joi.object().keys({
timeout: Joi.number().integer().optional().default(250).min(0), timeout: Joi.number().integer().optional().default(250).min(0),
retries: Joi.number().integer().optional().default(3).min(0), retries: Joi.number().integer().optional().default(3).min(0),
}).unknown(false).requiredKeys('url'), }).unknown(false).requiredKeys('url'),
language: Joi.object().keys({
url: Joi.string().uri({ scheme: /https?/ }),
timeout: Joi.number().integer().optional().default(250).min(0),
retries: Joi.number().integer().optional().default(3).min(0),
}).unknown(false).requiredKeys('url'),
interpolation: Joi.object().keys({ interpolation: Joi.object().keys({
url: Joi.string().uri({ scheme: /https?/ }), url: Joi.string().uri({ scheme: /https?/ }),
timeout: Joi.number().integer().optional().default(250).min(0), timeout: Joi.number().integer().optional().default(250).min(0),

4
test/unit/schema.js

@ -26,7 +26,7 @@ module.exports.tests.completely_valid = (test, common) => {
placeholder: { placeholder: {
url: 'http://localhost' url: 'http://localhost'
}, },
language: { interpolation: {
url: 'http://localhost' url: 'http://localhost'
} }
}, },
@ -543,7 +543,7 @@ module.exports.tests.api_services_validation = (test, common) => {
module.exports.tests.service_validation = (test, common) => { module.exports.tests.service_validation = (test, common) => {
// these tests apply for all the individual service definitions // these tests apply for all the individual service definitions
const services = ['pip', 'placeholder', 'language', 'interpolation']; const services = ['pip', 'placeholder', 'interpolation'];
test('timeout and retries not specified should default to 250 and 3', (t) => { test('timeout and retries not specified should default to 250 and 3', (t) => {
services.forEach(service => { services.forEach(service => {

Loading…
Cancel
Save