@@ -12,6 +12,8 @@ type Ref struct {
12
12
Ref string `json:"$ref" yaml:"$ref"`
13
13
}
14
14
15
+ // CallbackRef represents either a Callback or a $ref to a Callback.
16
+ // When serializing and both fields are set, Ref is preferred over Value.
15
17
type CallbackRef struct {
16
18
Ref string
17
19
Value * Callback
@@ -43,6 +45,8 @@ func (value CallbackRef) JSONLookup(token string) (interface{}, error) {
43
45
return ptr , err
44
46
}
45
47
48
+ // ExampleRef represents either a Example or a $ref to a Example.
49
+ // When serializing and both fields are set, Ref is preferred over Value.
46
50
type ExampleRef struct {
47
51
Ref string
48
52
Value * Example
@@ -74,6 +78,8 @@ func (value ExampleRef) JSONLookup(token string) (interface{}, error) {
74
78
return ptr , err
75
79
}
76
80
81
+ // HeaderRef represents either a Header or a $ref to a Header.
82
+ // When serializing and both fields are set, Ref is preferred over Value.
77
83
type HeaderRef struct {
78
84
Ref string
79
85
Value * Header
@@ -105,6 +111,8 @@ func (value HeaderRef) JSONLookup(token string) (interface{}, error) {
105
111
return ptr , err
106
112
}
107
113
114
+ // LinkRef represents either a Link or a $ref to a Link.
115
+ // When serializing and both fields are set, Ref is preferred over Value.
108
116
type LinkRef struct {
109
117
Ref string
110
118
Value * Link
@@ -125,6 +133,8 @@ func (value *LinkRef) Validate(ctx context.Context) error {
125
133
return foundUnresolvedRef (value .Ref )
126
134
}
127
135
136
+ // ParameterRef represents either a Parameter or a $ref to a Parameter.
137
+ // When serializing and both fields are set, Ref is preferred over Value.
128
138
type ParameterRef struct {
129
139
Ref string
130
140
Value * Parameter
@@ -156,6 +166,8 @@ func (value ParameterRef) JSONLookup(token string) (interface{}, error) {
156
166
return ptr , err
157
167
}
158
168
169
+ // ResponseRef represents either a Response or a $ref to a Response.
170
+ // When serializing and both fields are set, Ref is preferred over Value.
159
171
type ResponseRef struct {
160
172
Ref string
161
173
Value * Response
@@ -187,6 +199,8 @@ func (value ResponseRef) JSONLookup(token string) (interface{}, error) {
187
199
return ptr , err
188
200
}
189
201
202
+ // RequestBodyRef represents either a RequestBody or a $ref to a RequestBody.
203
+ // When serializing and both fields are set, Ref is preferred over Value.
190
204
type RequestBodyRef struct {
191
205
Ref string
192
206
Value * RequestBody
@@ -218,6 +232,8 @@ func (value RequestBodyRef) JSONLookup(token string) (interface{}, error) {
218
232
return ptr , err
219
233
}
220
234
235
+ // SchemaRef represents either a Schema or a $ref to a Schema.
236
+ // When serializing and both fields are set, Ref is preferred over Value.
221
237
type SchemaRef struct {
222
238
Ref string
223
239
Value * Schema
@@ -256,6 +272,8 @@ func (value SchemaRef) JSONLookup(token string) (interface{}, error) {
256
272
return ptr , err
257
273
}
258
274
275
+ // SecuritySchemeRef represents either a SecurityScheme or a $ref to a SecurityScheme.
276
+ // When serializing and both fields are set, Ref is preferred over Value.
259
277
type SecuritySchemeRef struct {
260
278
Ref string
261
279
Value * SecurityScheme
0 commit comments