@@ -421,11 +421,7 @@ -(NSNumber*) getPetByIdWithCompletionBlock: (NSNumber*) petId
421
421
422
422
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc ] init ];
423
423
if (petId != nil ) {
424
- if ([petId isKindOfClass: [NSNumber class ]]){
425
- pathParams[@" petId" ] = [((NSNumber *)petId) stringValue ];
426
- }else {
427
- pathParams[@" petId" ] = petId;
428
- }
424
+ pathParams[@" petId" ] = petId;
429
425
}
430
426
431
427
@@ -517,11 +513,7 @@ -(NSNumber*) updatePetWithFormWithCompletionBlock: (NSString*) petId
517
513
518
514
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc ] init ];
519
515
if (petId != nil ) {
520
- if ([petId isKindOfClass: [NSNumber class ]]){
521
- pathParams[@" petId" ] = [((NSNumber *)petId) stringValue ];
522
- }else {
523
- pathParams[@" petId" ] = petId;
524
- }
516
+ pathParams[@" petId" ] = petId;
525
517
}
526
518
527
519
@@ -559,21 +551,13 @@ -(NSNumber*) updatePetWithFormWithCompletionBlock: (NSString*) petId
559
551
560
552
561
553
if (name) {
562
- if ([name isKindOfClass: [NSNumber class ]]){
563
- formParams[@" name" ] = [((NSNumber *)name) stringValue ];
564
- }else {
565
- formParams[@" name" ] = name;
566
- }
554
+ formParams[@" name" ] = name;
567
555
}
568
556
569
557
570
558
571
559
if (status) {
572
- if ([status isKindOfClass: [NSNumber class ]]){
573
- formParams[@" status" ] = [((NSNumber *)status) stringValue ];
574
- }else {
575
- formParams[@" status" ] = status;
576
- }
560
+ formParams[@" status" ] = status;
577
561
}
578
562
579
563
@@ -630,24 +614,16 @@ -(NSNumber*) deletePetWithCompletionBlock: (NSNumber*) petId
630
614
631
615
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc ] init ];
632
616
if (petId != nil ) {
633
- if ([petId isKindOfClass: [NSNumber class ]]){
634
- pathParams[@" petId" ] = [((NSNumber *)petId) stringValue ];
635
- }else {
636
- pathParams[@" petId" ] = petId;
637
- }
617
+ pathParams[@" petId" ] = petId;
638
618
}
639
619
640
620
641
621
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
642
622
643
623
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
644
624
645
- if (apiKey != nil ){
646
- if ([apiKey isKindOfClass: [NSNumber class ]]){
647
- headerParams[@" api_key" ] = [((NSNumber *)apiKey) stringValue ];
648
- }else {
649
- headerParams[@" api_key" ] = apiKey;
650
- }
625
+ if (apiKey != nil ) {
626
+ headerParams[@" api_key" ] = apiKey;
651
627
}
652
628
653
629
@@ -733,11 +709,7 @@ -(NSNumber*) uploadFileWithCompletionBlock: (NSNumber*) petId
733
709
734
710
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc ] init ];
735
711
if (petId != nil ) {
736
- if ([petId isKindOfClass: [NSNumber class ]]){
737
- pathParams[@" petId" ] = [((NSNumber *)petId) stringValue ];
738
- }else {
739
- pathParams[@" petId" ] = petId;
740
- }
712
+ pathParams[@" petId" ] = petId;
741
713
}
742
714
743
715
@@ -775,11 +747,7 @@ -(NSNumber*) uploadFileWithCompletionBlock: (NSNumber*) petId
775
747
776
748
777
749
if (additionalMetadata) {
778
- if ([additionalMetadata isKindOfClass: [NSNumber class ]]){
779
- formParams[@" additionalMetadata" ] = [((NSNumber *)additionalMetadata) stringValue ];
780
- }else {
781
- formParams[@" additionalMetadata" ] = additionalMetadata;
782
- }
750
+ formParams[@" additionalMetadata" ] = additionalMetadata;
783
751
}
784
752
785
753
0 commit comments