This pull request addresses the lack of support for "enum" schemas. In addition to adding this feature, I've made some refactors to enhance the overall codebase. only edited discover.rs file in the core crate.
Changes Made:
Added Support for enum schema:
Since the utoipa already supports schemas for enum types, adding support for enum schema types is beneficial.
Refactoring:
created a single function for checking ToSchema and ToResponse macros, shared between enums and structs.
Implemented method chaining to reduce code complexity.
Introduced a DiscoverType to simplify the handling of vector tuples and enable easier iteration over the DiscoverType vector.
This pull request addresses the lack of support for "enum" schemas. In addition to adding this feature, I've made some refactors to enhance the overall codebase. only edited discover.rs file in the core crate.
Changes Made:
Added Support for enum schema: Since the utoipa already supports schemas for enum types, adding support for enum schema types is beneficial.
Refactoring: created a single function for checking ToSchema and ToResponse macros, shared between enums and structs. Implemented method chaining to reduce code complexity. Introduced a DiscoverType to simplify the handling of vector tuples and enable easier iteration over the DiscoverType vector.