Skip to content

Commit

Permalink
fix accepted options for mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
matmar10 committed Jun 17, 2020
1 parent b3fd06d commit 48e7832
Showing 1 changed file with 38 additions and 28 deletions.
66 changes: 38 additions & 28 deletions lib/options.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,7 @@
"properties": {},
"patternProperties": {
".*": {
"oneOf": [{
"description": "Output key to map value onto within destination object",
"type": "string"
}, {
"description": "List of outputs within destination object",
"type": "array",
"items": {
"oneOf": [{
"description": "Output key to map value onto within destination object",
"type": "string"
}, {
"type": "object",
"additionalProperties": true,
"properties": {
"key": {
"description": "Output key to map value onto within destination object",
"type": "string"
},
"transform": {
"description": "Function to transform the output value; see also: https://github.com/wankdanker/node-object-mapper",
"type": "object",
"additionalProperties": true
}
},
"required": ["key"]
}]
}
}]
"$ref": "#/definitions/PropertyMappingItem"
}
}
},
Expand All @@ -87,5 +60,42 @@
"additionalProperties": true
}]
}
},
"definitions": {
"PropertyMappingItem": {
"oneOf": [{
"description": "Output key to map value onto within destination object",
"type": "string"
}, {
"description": "List of outputs within destination object",
"type": "array",
"items": {
"oneOf": [{
"description": "Output key to map value onto within destination object",
"type": "string"
}, {
"$ref": "#/definitions/PropertyMappingObject"
}]
}
}, {
"$ref": "#/definitions/PropertyMappingObject"
}]
},
"PropertyMappingObject": {
"type": "object",
"additionalProperties": true,
"properties": {
"key": {
"description": "Output key to map value onto within destination object",
"type": "string"
},
"transform": {
"description": "Function to transform the output value; see also: https://github.com/wankdanker/node-object-mapper",
"type": "object",
"additionalProperties": true
}
},
"required": ["key"]
}
}
}

0 comments on commit 48e7832

Please sign in to comment.