We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 79bc313 + 2ee3cd1 commit 034145fCopy full SHA for 034145f
schemas.js
@@ -25,6 +25,7 @@ function mongoFieldTypeToSchemaAPIType(type) {
25
case 'string': return {type: 'String'};
26
case 'boolean': return {type: 'Boolean'};
27
case 'date': return {type: 'Date'};
28
+ case 'map':
29
case 'object': return {type: 'Object'};
30
case 'array': return {type: 'Array'};
31
case 'geopoint': return {type: 'GeoPoint'};
@@ -33,7 +34,7 @@ function mongoFieldTypeToSchemaAPIType(type) {
33
34
}
35
36
function mongoSchemaAPIResponseFields(schema) {
- fieldNames = Object.keys(schema).filter(key => key !== '_id');
37
+ fieldNames = Object.keys(schema).filter(key => key !== '_id' && key !== '_metadata');
38
response = fieldNames.reduce((obj, fieldName) => {
39
obj[fieldName] = mongoFieldTypeToSchemaAPIType(schema[fieldName])
40
return obj;
0 commit comments