Skip to content

Commit 06fba57

Browse files
Fix spec
1 parent 8f5059b commit 06fba57

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

features/open_api.feature

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -342,19 +342,16 @@ Feature: Generate Open API Specification from test examples
342342
"200": {
343343
"description": "List all instructions",
344344
"schema": {
345-
"description": "",
346345
"type": "object",
347346
"properties": {
348347
}
349348
},
350349
"headers": {
351350
"Content-Type": {
352-
"description": "",
353351
"type": "string",
354352
"x-example-value": "text/html;charset=utf-8"
355353
},
356354
"Content-Length": {
357-
"description": "",
358355
"type": "string",
359356
"x-example-value": "57"
360357
}
@@ -449,19 +446,16 @@ Feature: Generate Open API Specification from test examples
449446
"200": {
450447
"description": "Getting a list of orders",
451448
"schema": {
452-
"description": "",
453449
"type": "object",
454450
"properties": {
455451
}
456452
},
457453
"headers": {
458454
"Content-Type": {
459-
"description": "",
460455
"type": "string",
461456
"x-example-value": "application/vnd.api+json"
462457
},
463458
"Content-Length": {
464-
"description": "",
465459
"type": "string",
466460
"x-example-value": "137"
467461
}
@@ -509,7 +503,6 @@ Feature: Generate Open API Specification from test examples
509503
"description": "",
510504
"required": false,
511505
"schema": {
512-
"description": "",
513506
"type": "object",
514507
"properties": {
515508
"data": {
@@ -560,19 +553,16 @@ Feature: Generate Open API Specification from test examples
560553
"201": {
561554
"description": "Creating an order",
562555
"schema": {
563-
"description": "",
564556
"type": "object",
565557
"properties": {
566558
}
567559
},
568560
"headers": {
569561
"Content-Type": {
570-
"description": "",
571562
"type": "string",
572563
"x-example-value": "application/json"
573564
},
574565
"Content-Length": {
575-
"description": "",
576566
"type": "string",
577567
"x-example-value": "73"
578568
}
@@ -620,19 +610,16 @@ Feature: Generate Open API Specification from test examples
620610
"200": {
621611
"description": "Getting a specific order",
622612
"schema": {
623-
"description": "",
624613
"type": "object",
625614
"properties": {
626615
}
627616
},
628617
"headers": {
629618
"Content-Type": {
630-
"description": "",
631619
"type": "string",
632620
"x-example-value": "application/json"
633621
},
634622
"Content-Length": {
635-
"description": "",
636623
"type": "string",
637624
"x-example-value": "73"
638625
}
@@ -679,7 +666,6 @@ Feature: Generate Open API Specification from test examples
679666
"description": "",
680667
"required": false,
681668
"schema": {
682-
"description": "",
683669
"type": "object",
684670
"properties": {
685671
"data": {
@@ -713,19 +699,16 @@ Feature: Generate Open API Specification from test examples
713699
"200": {
714700
"description": "Update an order",
715701
"schema": {
716-
"description": "",
717702
"type": "object",
718703
"properties": {
719704
}
720705
},
721706
"headers": {
722707
"Content-Type": {
723-
"description": "",
724708
"type": "string",
725709
"x-example-value": "application/json"
726710
},
727711
"Content-Length": {
728-
"description": "",
729712
"type": "string",
730713
"x-example-value": "63"
731714
}
@@ -736,19 +719,16 @@ Feature: Generate Open API Specification from test examples
736719
"400": {
737720
"description": "Invalid request",
738721
"schema": {
739-
"description": "",
740722
"type": "object",
741723
"properties": {
742724
}
743725
},
744726
"headers": {
745727
"Content-Type": {
746-
"description": "",
747728
"type": "string",
748729
"x-example-value": "application/json"
749730
},
750731
"Content-Length": {
751-
"description": "",
752732
"type": "string",
753733
"x-example-value": "0"
754734
}
@@ -787,19 +767,16 @@ Feature: Generate Open API Specification from test examples
787767
"200": {
788768
"description": "Deleting an order",
789769
"schema": {
790-
"description": "",
791770
"type": "object",
792771
"properties": {
793772
}
794773
},
795774
"headers": {
796775
"Content-Type": {
797-
"description": "",
798776
"type": "string",
799777
"x-example-value": "text/html;charset=utf-8"
800778
},
801779
"Content-Length": {
802-
"description": "",
803780
"type": "string",
804781
"x-example-value": "0"
805782
}

lib/rspec_api_documentation/open_api/parameter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Parameter < Node
1818
add_setting :enum
1919

2020
def description_with_example
21-
str = description_without_example.dup || ''
21+
str = description_without_example ? description_without_example.dup : ''
2222
if with_example && value
2323
str << "\n" unless str.empty?
2424
str << "Eg, `#{value}`"

0 commit comments

Comments
 (0)