mirror of
https://github.com/oatpp/oatpp.git
synced 2025-02-23 17:40:28 +08:00
Endpoint: Support multiple example values.
This commit is contained in:
parent
2ec763b814
commit
ebeb78b1e6
@ -67,7 +67,12 @@ public:
|
||||
oatpp::Boolean required = true;
|
||||
oatpp::Boolean deprecated = false;
|
||||
oatpp::Boolean allowEmptyValue;
|
||||
oatpp::Any example;
|
||||
std::list<std::pair<oatpp::String, oatpp::Any>> examples;
|
||||
|
||||
Param& addExample(const oatpp::String& title, const oatpp::Any& example) {
|
||||
examples.push_back({title, example});
|
||||
return *this;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@ -116,7 +121,12 @@ public:
|
||||
oatpp::String contentType;
|
||||
oatpp::data::mapping::type::Type* schema;
|
||||
oatpp::String description;
|
||||
oatpp::Any example;
|
||||
std::list<std::pair<oatpp::String, oatpp::Any>> examples;
|
||||
|
||||
ContentHints& addExample(const oatpp::String& title, const oatpp::Any& example) {
|
||||
examples.push_back({title, example});
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user