aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/umosapi.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/umosapi.cpp b/api/umosapi.cpp
index 989dbe2..5c8717a 100644
--- a/api/umosapi.cpp
+++ b/api/umosapi.cpp
@@ -179,6 +179,9 @@ void UmosapiService::Api::propertie(std::string name, std::string format, std::s
UmosapiService::Api::_swagger["definitions"][UmosapiService::Api::_definition.name]["type"] = "array";
std::string schema_path = "#/definitions/";
UmosapiService::Api::_swagger["definitions"][UmosapiService::Api::_definition.name]["items"]["$ref"] = schema_path.append(name);
+ } else if (format == "mongoid") {
+ UmosapiService::Api::_swagger["definitions"][UmosapiService::Api::_definition.name]["properties"][name]["type"] = "object";
+ UmosapiService::Api::_swagger["definitions"][UmosapiService::Api::_definition.name]["properties"][name]["properties"]["$oid"][type] = "string";
} else {
UmosapiService::Api::_swagger["definitions"][UmosapiService::Api::_definition.name]["properties"][name]["format"] = format;
UmosapiService::Api::_swagger["definitions"][UmosapiService::Api::_definition.name]["properties"][name]["type"] = type;