mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-12-01 02:17:50 +01:00
Openapi Schema improvements
- Return proper booleans in api responses - Update jsonschemavalidation to latest draft
This commit is contained in:
69 files changed
+862
-2082
No files matched your search
@@ -27,6 +27,24 @@ module.exports = {
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
convertIntFieldsToBool: function (obj, fields) {
|
||||
fields.forEach(function (field) {
|
||||
if (typeof obj[field] !== 'undefined') {
|
||||
obj[field] = obj[field] === 1;
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
},
|
||||
|
||||
convertBoolFieldsToInt: function (obj, fields) {
|
||||
fields.forEach(function (field) {
|
||||
if (typeof obj[field] !== 'undefined') {
|
||||
obj[field] = obj[field] ? 1 : 0;
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
};
|
||||
Reference in new issue
Block a user