-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
https://oatpp.io/docs/components/api-controller/#path-variables-mapping
The following does not compile
ENDPOINT("GET", "/users/{userId}", getUserById,
PATH(Int64, userId))
{
OATPP_LOGD("Test", "userId=%d", userId->getValue());
return createResponse(Status::CODE_200, "OK");
}Produces error:
error: request for member ‘getValue’ in ‘*(& userId)->oatpp::data::mapping::type::Primitive<long int, oatpp::data::mapping::type::__class::Int64>::<anonymous>.oatpp::data::mapping::type::ObjectWrapper<long int, oatpp::data::mapping::type::__class::Int64>::operator->()’, which is of non-class type ‘long int’ 61 | OATPP_LOGD("Test", "userId=%d", userId->getValue());
If the userId pointer is dereferenced it works
ENDPOINT("GET", "/users/{userId}",
PATH(Int64, userId))
{
OATPP_LOGD("Test", "userId=%d", *userId);
return createResponse(Status::CODE_200, "OK");
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels