Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
sabudilovskiy committed Nov 30, 2023
1 parent 3c98245 commit b63af1d
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions utests/openapi/doc/serialize/basic_enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@

namespace test_models
{
// DECLARE_OPENAPI_ENUM(UserType, int, root, teacher, user, admin, tester);
enum struct UserType : int
{
root,
teacher,
user,
admin,
tester
};
struct enum_introspector_UserType;
consteval enum_introspector_UserType* get_enum_introspector(
std ::type_identity<UserType>)
{
return nullptr;
}
struct enum_introspector_UserType
{
using enum UserType;
static constexpr std::array<std::string_view, 5> names = {
"root", "teacher", "user", "admin", "tester"};
static constexpr std::array<UserType, 5> values = {root, teacher, user,
admin, tester};
};
DECLARE_OPENAPI_ENUM(UserType, int, root, teacher, user, admin, tester);
// enum struct UserType : int
// {
// root,
// teacher,
// user,
// admin,
// tester
// };
// struct enum_introspector_UserType;
// consteval enum_introspector_UserType* get_enum_introspector(
// std ::type_identity<UserType>)
// {
// return nullptr;
// }
// struct enum_introspector_UserType
// {
// using enum UserType;
// static constexpr std::array<std::string_view, 5> names = {
// "root", "teacher", "user", "admin", "tester"};
// static constexpr std::array<UserType, 5> values = {root, teacher, user,
// admin, tester};
// };

} // namespace test_models

Expand Down

0 comments on commit b63af1d

Please sign in to comment.