naming fix

This commit is contained in:
lganzzzo 2018-03-30 23:20:33 +03:00
parent d79792b9a9
commit f9a76661b1
4 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ StringPtrWrapper::operator std::string() const {
if(m_ptr){
return m_ptr->std_str();
}
return nullptr;
return "";
}
namespace __class {

View File

@ -95,7 +95,7 @@ public:
}
template<class Type>
void readBodyToDTO(oatpp::base::PtrWrapper<Type>& objectWrapper,
void readBodyToDto(oatpp::base::PtrWrapper<Type>& objectWrapper,
const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& objectMapper) const {
objectWrapper = objectMapper->readFromString<Type>
(protocol::http::incoming::BodyDecoder::decodeToString(headers, bodyStream));

View File

@ -67,7 +67,7 @@ public:
}
template<class Type>
typename Type::PtrWrapper readBodyToDTO(const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& objectMapper) const {
typename Type::PtrWrapper readBodyToDto(const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& objectMapper) const {
return objectMapper->readFromString<Type>
(protocol::http::incoming::BodyDecoder::decodeToString(headers, bodyStream));
}

View File

@ -191,7 +191,7 @@ info->body.type = oatpp::data::mapping::type::__class::String::getType();
#define OATPP_MACRO_API_CONTROLLER_BODY_DTO(TYPE, NAME, PARAM_LIST) \
TYPE NAME; \
__request->readBodyToDTO(NAME, getDefaultObjectMapper()); \
__request->readBodyToDto(NAME, getDefaultObjectMapper()); \
if(NAME.isNull()) { \
return ApiController::handleError(Status::CODE_400, "Missing valid body parameter '" #NAME "'"); \
}