Skip to content

Commit

Permalink
rename schamasByServerURI -> schemasByKey
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluisdiaz committed Feb 5, 2018
1 parent dea757e commit d68fc35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/RouteSchemaManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var ZSchema = require('z-schema'),
var RouteSchemaManager = function(options) {
options = options || {};

var schemasByServerUri = {},
var schemasByKey = {},
validationTypes = {
PATH: 'path',
QUERY: 'query',
Expand Down Expand Up @@ -102,7 +102,7 @@ var RouteSchemaManager = function(options) {
forEachValidationOption(route, function(validationOption, validationType) {
schemas = schemas || {};
var key = constructSchemaKey(validationType, route.method, route.path);
schemas[validationType] = schemasByServerUri[key];
schemas[validationType] = schemasByKey[key];
});
return schemas;
},
Expand Down Expand Up @@ -214,8 +214,8 @@ var RouteSchemaManager = function(options) {

this.initializeRoutes = function(routes) {
routes.forEach(function(route) {
schemasByServerUri = _.extend(
schemasByServerUri,
schemasByKey = _.extend(
schemasByKey,
generateSchemasForRoute(route));
});
};
Expand Down

0 comments on commit d68fc35

Please sign in to comment.