@@ -36,6 +36,7 @@ let fake_http_signature_test ~pet_t ?query_1 ?header_1 () =
36
36
37
37
38
38
39
+
39
40
header_1 in
40
41
let uri = Request. maybe_add_query_param uri " query_1"
41
42
@@ -50,6 +51,7 @@ let fake_http_signature_test ~pet_t ?query_1 ?header_1 () =
50
51
51
52
52
53
54
+
53
55
query_1 in
54
56
let body = Request.
55
57
@@ -240,6 +242,7 @@ let test_body_with_query_params ~query ~user_t =
240
242
241
243
242
244
245
+
243
246
query in
244
247
let body = Request.
245
248
@@ -297,6 +300,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
297
300
298
301
299
302
303
+
300
304
integer in
301
305
let body = Request. maybe_add_form_encoded_body_param body " int32"
302
306
Int32. to_string
@@ -311,6 +315,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
311
315
312
316
313
317
318
+
314
319
int32 in
315
320
let body = Request. maybe_add_form_encoded_body_param body " int64" Int64. to_string
316
321
@@ -325,6 +330,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
325
330
326
331
327
332
333
+
328
334
int64 in
329
335
let body = Request. add_form_encoded_body_param body " number"
330
336
@@ -339,6 +345,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
339
345
340
346
341
347
348
+
342
349
number in
343
350
let body = Request. maybe_add_form_encoded_body_param body " float"
344
351
@@ -353,6 +360,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
353
360
354
361
355
362
363
+
356
364
float in
357
365
let body = Request. add_form_encoded_body_param body " double"
358
366
@@ -367,6 +375,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
367
375
368
376
369
377
378
+
370
379
double in
371
380
let body = Request. maybe_add_form_encoded_body_param body " string"
372
381
@@ -381,6 +390,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
381
390
382
391
383
392
393
+
384
394
string in
385
395
let body = Request. add_form_encoded_body_param body " pattern_without_delimiter"
386
396
@@ -395,6 +405,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
395
405
396
406
397
407
408
+
398
409
pattern_without_delimiter in
399
410
let body = Request. add_form_encoded_body_param body " byte"
400
411
@@ -409,6 +420,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
409
420
(fun x -> x)
410
421
411
422
423
+
412
424
byte in
413
425
let body = Request. maybe_add_form_encoded_body_param body " binary"
414
426
@@ -423,6 +435,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
423
435
424
436
425
437
438
+
426
439
binary in
427
440
let body = Request. maybe_add_form_encoded_body_param body " date"
428
441
@@ -437,6 +450,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
437
450
438
451
439
452
453
+
440
454
date in
441
455
let body = Request. maybe_add_form_encoded_body_param body " date_time"
442
456
@@ -451,6 +465,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
451
465
452
466
453
467
468
+
454
469
date_time in
455
470
let body = Request. maybe_add_form_encoded_body_param body " password"
456
471
@@ -465,6 +480,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
465
480
466
481
467
482
483
+
468
484
password in
469
485
let body = Request. maybe_add_form_encoded_body_param body " callback"
470
486
@@ -479,6 +495,7 @@ let test_endpoint_parameters ~number ~double ~pattern_without_delimiter ~byte ?i
479
495
480
496
481
497
498
+
482
499
callback in
483
500
let body = Request. finalize_form_encoded_body body in
484
501
Cohttp_lwt_unix.Client. call `POST uri ~headers ~body >> = fun (resp , body ) ->
@@ -489,18 +506,24 @@ let test_enum_parameters ?(enum_header_string_array = []) ?(enum_header_string =
489
506
let uri = Request. build_uri " /fake" in
490
507
let headers = Request. default_headers in
491
508
let headers = Request. add_header_multi headers " enum_header_string_array" (Stdlib.List. map Enums. show_enum_form_string_array
509
+
492
510
)
493
511
enum_header_string_array in
494
512
let headers = Request. add_header headers " enum_header_string" Enums. show_enumclass
513
+
495
514
enum_header_string in
496
515
let uri = Request. add_query_param_list uri " enum_query_string_array" (Stdlib.List. map Enums. show_enum_form_string_array
516
+
497
517
)
498
518
enum_query_string_array in
499
519
let uri = Request. add_query_param uri " enum_query_string" Enums. show_enumclass
520
+
500
521
enum_query_string in
501
522
let uri = Request. maybe_add_query_param uri " enum_query_integer" Enums. show_enum_query_integer
523
+
502
524
enum_query_integer in
503
525
let uri = Request. maybe_add_query_param uri " enum_query_double" Enums. show_enum_number
526
+
504
527
enum_query_double in
505
528
let uri = Request. add_query_param_list uri " enum_query_model_array" (Stdlib.List. map
506
529
@@ -515,6 +538,7 @@ let test_enum_parameters ?(enum_header_string_array = []) ?(enum_header_string =
515
538
516
539
517
540
541
+ (failwith " Unsupported: enum reference" )
518
542
)
519
543
520
544
@@ -531,9 +555,11 @@ let test_enum_parameters ?(enum_header_string_array = []) ?(enum_header_string =
531
555
enum_query_model_array in
532
556
let body = Request. init_form_encoded_body () in
533
557
let body = Request. add_form_encoded_body_param_list body " enum_form_string_array" (Stdlib.List. map Enums. show_enum_form_string_array
558
+
534
559
)
535
560
enum_form_string_array in
536
561
let body = Request. add_form_encoded_body_param body " enum_form_string" Enums. show_enumclass
562
+
537
563
enum_form_string in
538
564
let body = Request. finalize_form_encoded_body body in
539
565
Cohttp_lwt_unix.Client. call `GET uri ~headers ~body >> = fun (resp , body ) ->
@@ -556,6 +582,7 @@ let test_group_parameters ~required_string_group ~required_boolean_group ~requir
556
582
557
583
558
584
585
+
559
586
required_boolean_group in
560
587
let headers = Request. maybe_add_header headers " boolean_group"
561
588
@@ -570,6 +597,7 @@ let test_group_parameters ~required_string_group ~required_boolean_group ~requir
570
597
571
598
572
599
600
+
573
601
boolean_group in
574
602
let uri = Request. add_query_param uri " required_string_group"
575
603
Int32. to_string
@@ -584,6 +612,7 @@ let test_group_parameters ~required_string_group ~required_boolean_group ~requir
584
612
585
613
586
614
615
+
587
616
required_string_group in
588
617
let uri = Request. add_query_param uri " required_int64_group" Int64. to_string
589
618
@@ -598,6 +627,7 @@ let test_group_parameters ~required_string_group ~required_boolean_group ~requir
598
627
599
628
600
629
630
+
601
631
required_int64_group in
602
632
let uri = Request. maybe_add_query_param uri " string_group"
603
633
Int32. to_string
@@ -612,6 +642,7 @@ let test_group_parameters ~required_string_group ~required_boolean_group ~requir
612
642
613
643
614
644
645
+
615
646
string_group in
616
647
let uri = Request. maybe_add_query_param uri " int64_group" Int64. to_string
617
648
@@ -626,6 +657,7 @@ let test_group_parameters ~required_string_group ~required_boolean_group ~requir
626
657
627
658
628
659
660
+
629
661
int64_group in
630
662
Cohttp_lwt_unix.Client. call `DELETE uri ~headers >> = fun (resp , body ) ->
631
663
Request. handle_unit_response resp
@@ -698,6 +730,7 @@ let test_json_form_data ~param ~param2 =
698
730
699
731
700
732
733
+
701
734
param in
702
735
let body = Request. add_form_encoded_body_param body " param2"
703
736
@@ -712,6 +745,7 @@ let test_json_form_data ~param ~param2 =
712
745
713
746
714
747
748
+
715
749
param2 in
716
750
let body = Request. finalize_form_encoded_body body in
717
751
Cohttp_lwt_unix.Client. call `GET uri ~headers ~body >> = fun (resp , body ) ->
@@ -755,6 +789,7 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
755
789
756
790
757
791
792
+
758
793
)
759
794
760
795
@@ -782,6 +817,7 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
782
817
783
818
784
819
820
+
785
821
)
786
822
787
823
@@ -809,6 +845,7 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
809
845
810
846
811
847
848
+
812
849
)
813
850
814
851
@@ -836,6 +873,7 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
836
873
837
874
838
875
876
+
839
877
)
840
878
841
879
@@ -863,6 +901,7 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
863
901
864
902
865
903
904
+
866
905
)
867
906
868
907
@@ -877,7 +916,8 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
877
916
878
917
879
918
context in
880
- let uri = Request. add_query_param uri " language" (Stdlib.List. map
919
+ let uri = Request. add_query_param_exploded_form_object uri " language"
920
+
881
921
882
922
883
923
@@ -890,7 +930,8 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
890
930
891
931
892
932
893
- )
933
+
934
+
894
935
895
936
896
937
@@ -917,6 +958,7 @@ let test_query_parameter_collection_format ~pipe ~ioutil ~http ~url ~context ~al
917
958
918
959
919
960
961
+
920
962
allow_empty in
921
963
Cohttp_lwt_unix.Client. call `PUT uri ~headers >> = fun (resp , body ) ->
922
964
Request. handle_unit_response resp
0 commit comments