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 458e349 commit 400324d
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions utests/openapi/doc/serialize/basic_enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,27 @@ DECLARE_OPENAPI_ENUM(UserType, int, root, teacher, user, admin, tester);

} // namespace test_models

UTEST(OpenApiDoc, BasicEnum)
{
::openapi::Doc doc;
Append(openapi::DocHelper{doc.value_, doc.value_},
std::type_identity<test_models::UserType>{});
auto value = doc().ExtractValue();
auto result_schema = ToString(value);
EXPECT_EQ(result_schema, RAW_STRING(
R"(
components:
schemas:
test_models.UserType:
type: string
enum:
- root
- teacher
- user
- admin
- tester
)"));
}
// UTEST(OpenApiDoc, BasicEnum)
// {
// ::openapi::Doc doc;
// Append(openapi::DocHelper{doc.value_, doc.value_},
// std::type_identity<test_models::UserType>{});
// auto value = doc().ExtractValue();
// auto result_schema = ToString(value);
// EXPECT_EQ(result_schema, RAW_STRING(
// R"(
// components:
// schemas:
// test_models.UserType:
// type: string
// enum:
// - root
// - teacher
// - user
// - admin
// - tester
// )"));
// }

UTEST(OpenApiDoc, BasicEnumerator)
{
Expand Down

0 comments on commit 400324d

Please sign in to comment.