(t *testing.T)
| 121 | } |
| 122 | |
| 123 | func TestGatherSchemas_ComponentHeaders(t *testing.T) { |
| 124 | spec := &openapi3.T{ |
| 125 | Components: &openapi3.Components{ |
| 126 | Headers: openapi3.Headers{ |
| 127 | "X-Rate-Limit": &openapi3.HeaderRef{ |
| 128 | Value: &openapi3.Header{ |
| 129 | Parameter: openapi3.Parameter{ |
| 130 | Schema: &openapi3.SchemaRef{ |
| 131 | Value: &openapi3.Schema{Type: &openapi3.Types{"integer"}}, |
| 132 | }, |
| 133 | }, |
| 134 | }, |
| 135 | }, |
| 136 | }, |
| 137 | }, |
| 138 | } |
| 139 | |
| 140 | opts := Configuration{} |
| 141 | schemas := GatherSchemas(spec, opts) |
| 142 | |
| 143 | require.Len(t, schemas, 1) |
| 144 | assert.Equal(t, SchemaPath{"components", "headers", "X-Rate-Limit"}, schemas[0].Path) |
| 145 | assert.Equal(t, ContextComponentHeader, schemas[0].Context) |
| 146 | } |
| 147 | |
| 148 | func TestGatherSchemas_ClientResponseWrappers(t *testing.T) { |
| 149 | paths := openapi3.NewPaths() |
nothing calls this directly
no test coverage detected