Skip to content

Commit

Permalink
This commit fix #51
Browse files Browse the repository at this point in the history
  • Loading branch information
naokikimura committed Feb 24, 2018
1 parent 0909d93 commit e9a6fcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function castType(value, schema, types) {
function createTypes(definitions, ignoreKeys) {
return toPairs(definitions)
.filter(([key]) => !ignoreKeys.includes(key))
.map(([key, definition]) => ([toCamelCase('_' + definition.title), definition.items]))
.map(([, definition]) => ([toCamelCase('_' + definition.title), definition.items]))
.map(([name, items]) => {
const args = items.map(item => ({ 'default': item['default'], argument: toCamelCase(item.title) }))
.map(({ 'default': defaultValue, argument }) => defaultValue !== undefined ? `${argument}=${JSON.stringify(defaultValue)}` : argument)
Expand Down Expand Up @@ -246,7 +246,7 @@ const commonDefinitionKeys = Object.keys(common.definitions);
const commonTypes = defineFromTupleFunction(createTypes(common.definitions, []), common.definitions, {});
toPairs(commonTypes)
.filter(([typeName]) => typeName === 'Datum')
.forEach(([name, constractor]) => defineDatumPrototypeFunction(constractor));
.forEach(([, constractor]) => defineDatumPrototypeFunction(constractor));
module.exports['common'] = { types: commonTypes, toTuple };
toPairs(services).filter(([serviceName]) => serviceName !== 'Common').forEach(([className, schema]) => {
debug(className, schema);
Expand Down

0 comments on commit e9a6fcb

Please sign in to comment.