@@ -35,7 +35,17 @@ public class OpenApiReferencableTests
35
35
}
36
36
} ;
37
37
private static readonly OpenApiRequestBody _requestBodyFragment = new OpenApiRequestBody ( ) ;
38
- private static readonly OpenApiResponse _responseFragment = new OpenApiResponse ( ) ;
38
+ private static readonly OpenApiResponse _responseFragment = new OpenApiResponse ( )
39
+ {
40
+ Headers = new Dictionary < string , OpenApiHeader >
41
+ {
42
+ { "header1" , new OpenApiHeader ( ) }
43
+ } ,
44
+ Links = new Dictionary < string , OpenApiLink >
45
+ {
46
+ { "link1" , new OpenApiLink ( ) }
47
+ }
48
+ } ;
39
49
private static readonly OpenApiSchema _schemaFragment = new OpenApiSchema ( ) ;
40
50
private static readonly OpenApiSecurityScheme _securitySchemeFragment = new OpenApiSecurityScheme ( ) ;
41
51
private static readonly OpenApiTag _tagFragment = new OpenApiTag ( ) ;
@@ -54,6 +64,8 @@ public class OpenApiReferencableTests
54
64
new object [ ] { _parameterFragment , "/examples/example1" , _parameterFragment . Examples [ "example1" ] } ,
55
65
new object [ ] { _requestBodyFragment , "/" , _requestBodyFragment } ,
56
66
new object [ ] { _responseFragment , "/" , _responseFragment } ,
67
+ new object [ ] { _responseFragment , "/headers/header1" , _responseFragment . Headers [ "header1" ] } ,
68
+ new object [ ] { _responseFragment , "/links/link1" , _responseFragment . Links [ "link1" ] } ,
57
69
new object [ ] { _schemaFragment , "/" , _schemaFragment } ,
58
70
new object [ ] { _securitySchemeFragment , "/" , _securitySchemeFragment } ,
59
71
new object [ ] { _tagFragment , "/" , _tagFragment } ,
@@ -90,7 +102,16 @@ public void ResolveReferenceCanResolveValidJsonPointers(
90
102
new object [ ] { _parameterFragment , "/a" } ,
91
103
new object [ ] { _parameterFragment , "/examples" } ,
92
104
new object [ ] { _parameterFragment , "/examples/" } ,
93
- new object [ ] { _parameterFragment , "/examples/a" }
105
+ new object [ ] { _parameterFragment , "/examples/a" } ,
106
+ new object [ ] { _responseFragment , null } ,
107
+ new object [ ] { _responseFragment , "" } ,
108
+ new object [ ] { _responseFragment , "/a" } ,
109
+ new object [ ] { _responseFragment , "/headers" } ,
110
+ new object [ ] { _responseFragment , "/headers/" } ,
111
+ new object [ ] { _responseFragment , "/headers/a" } ,
112
+ new object [ ] { _responseFragment , "/content" } ,
113
+ new object [ ] { _responseFragment , "/content/" } ,
114
+ new object [ ] { _responseFragment , "/content/a" } ,
94
115
95
116
} ;
96
117
0 commit comments