File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog - utoipa-gen
2
2
3
+ ## Unreleased
4
+
5
+ ### Fixed
6
+
7
+ * Fix ` no_recursion ` support on maps (https://github.com/juhaku/utoipa/pull/1167 )
8
+
3
9
## 5.1.2 - Oct 16 2024
4
10
5
11
### Added
Original file line number Diff line number Diff line change @@ -1149,6 +1149,7 @@ impl ComponentSchema {
1149
1149
for feature in features. iter ( ) . filter ( |feature| feature. is_validatable ( ) ) {
1150
1150
feature. validate ( & schema_type, type_tree) ;
1151
1151
}
1152
+ let _ = pop_feature ! ( features => Feature :: NoRecursion ( _) ) ; // primitive types are not recursive
1152
1153
tokens. extend ( features. to_token_stream ( ) ?) ;
1153
1154
}
1154
1155
ValueType :: Value => {
Original file line number Diff line number Diff line change @@ -5970,6 +5970,7 @@ fn test_named_and_enum_container_recursion_compiles() {
5970
5970
pub struct Tree {
5971
5971
left : Box < Tree > ,
5972
5972
right : Box < Tree > ,
5973
+ map : HashMap < String , Tree > ,
5973
5974
}
5974
5975
5975
5976
#[ derive( ToSchema ) ]
@@ -5988,7 +5989,7 @@ fn test_named_and_enum_container_recursion_compiles() {
5988
5989
right : Box < Recursion > ,
5989
5990
} ,
5990
5991
#[ schema( no_recursion) ]
5991
- Unnamed ( Box < Recursion > ) ,
5992
+ Unnamed ( HashMap < String , Recursion > ) ,
5992
5993
NoValue ,
5993
5994
}
5994
5995
You can’t perform that action at this time.
0 commit comments