File tree Expand file tree Collapse file tree 2 files changed +1
-48
lines changed Expand file tree Collapse file tree 2 files changed +1
-48
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ type Definition struct {
48
48
AdditionalProperties any `json:"additionalProperties,omitempty"`
49
49
// Whether the schema is nullable or not.
50
50
Nullable bool `json:"nullable,omitempty"`
51
- // MaxContains specifies the maximum number of elements in an array that can match the schema.
51
+ // MinContains specifies the minimum number of elements in an array that can match the schema.
52
52
MinContains int `json:"minContains,omitempty"`
53
53
}
54
54
Original file line number Diff line number Diff line change @@ -329,53 +329,6 @@ func TestStructToSchema(t *testing.T) {
329
329
"additionalProperties":false
330
330
}` ,
331
331
},
332
- {
333
- name : "Test with exclude mark" ,
334
- in : struct {
335
- Name string `json:"-"`
336
- }{
337
- Name : "Name" ,
338
- },
339
- want : `{
340
- "type":"object",
341
- "additionalProperties":false
342
- }` ,
343
- },
344
- {
345
- name : "Test with no json tag" ,
346
- in : struct {
347
- Name string
348
- }{
349
- Name : "" ,
350
- },
351
- want : `{
352
- "type":"object",
353
- "properties":{
354
- "Name":{
355
- "type":"string"
356
- }
357
- },
358
- "required":["Name"],
359
- "additionalProperties":false
360
- }` ,
361
- },
362
- {
363
- name : "Test with omitempty tag" ,
364
- in : struct {
365
- Name string `json:"name,omitempty"`
366
- }{
367
- Name : "" ,
368
- },
369
- want : `{
370
- "type":"object",
371
- "properties":{
372
- "name":{
373
- "type":"string"
374
- }
375
- },
376
- "additionalProperties":false
377
- }` ,
378
- },
379
332
}
380
333
381
334
for _ , tt := range tests {
You can’t perform that action at this time.
0 commit comments