mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
[C++][Pistache] Rename value holder to lower chance of collision with parameter name (#4948)
* [C++][Pistache] Rename value holder to lower chance of collision with parameter name * [C++][Pistache] Update Petstore sample
This commit is contained in:
committed by
sunn
parent
2bc3c196e8
commit
6af27d52ca
@@ -91,9 +91,9 @@ void PetApi::find_pets_by_status_handler(const Pistache::Rest::Request &request,
|
||||
auto statusQuery = request.query().get("status");
|
||||
Pistache::Optional<std::vector<std::string>> status;
|
||||
if(!statusQuery.isEmpty()){
|
||||
std::vector<std::string> value;
|
||||
if(fromStringValue(statusQuery.get(), value)){
|
||||
status = Pistache::Some(value);
|
||||
std::vector<std::string> valueQuery_instance;
|
||||
if(fromStringValue(statusQuery.get(), valueQuery_instance)){
|
||||
status = Pistache::Some(valueQuery_instance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,9 +116,9 @@ void PetApi::find_pets_by_tags_handler(const Pistache::Rest::Request &request, P
|
||||
auto tagsQuery = request.query().get("tags");
|
||||
Pistache::Optional<std::vector<std::string>> tags;
|
||||
if(!tagsQuery.isEmpty()){
|
||||
std::vector<std::string> value;
|
||||
if(fromStringValue(tagsQuery.get(), value)){
|
||||
tags = Pistache::Some(value);
|
||||
std::vector<std::string> valueQuery_instance;
|
||||
if(fromStringValue(tagsQuery.get(), valueQuery_instance)){
|
||||
tags = Pistache::Some(valueQuery_instance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user