File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages
samples/client/petstore/apex/.openapi-generator Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 18
18
package org .openapitools .codegen .languages ;
19
19
20
20
import java .util .*;
21
+
21
22
import com .google .common .base .Strings ;
22
23
import org .apache .commons .lang3 .StringUtils ;
23
24
import org .openapitools .codegen .CodegenConfig ;
35
36
import org .slf4j .Logger ;
36
37
import org .slf4j .LoggerFactory ;
37
38
38
-
39
-
40
39
public abstract class AbstractApexCodegen extends DefaultCodegen implements CodegenConfig {
41
40
private static final Logger LOGGER = LoggerFactory .getLogger (AbstractApexCodegen .class );
42
41
@@ -325,7 +324,7 @@ public String toExampleValue(Schema p) {
325
324
if (example .isEmpty ()) {
326
325
example = "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu" ;
327
326
}
328
- (( ByteArraySchema ) p ) .setExample (example );
327
+ p .setExample (example );
329
328
example = "EncodingUtil.base64Decode('" + example + "')" ;
330
329
} else if (ModelUtils .isDateSchema (p )) {
331
330
if (example .matches ("^\\ d{4}(-\\ d{2}){2}" )) {
Original file line number Diff line number Diff line change 26
26
import io .swagger .v3 .oas .models .OpenAPI ;
27
27
import org .slf4j .Logger ;
28
28
import org .slf4j .LoggerFactory ;
29
+
29
30
import java .io .File ;
30
31
import java .util .*;
31
32
@@ -224,7 +225,7 @@ public String toDefaultValue(Schema p) {
224
225
);
225
226
} else if (ModelUtils .isBooleanSchema (p )) {
226
227
// true => "true", false => "false", null => "null"
227
- out = String .valueOf ((( BooleanSchema ) p ) .getDefault ());
228
+ out = String .valueOf (p .getDefault ());
228
229
} else if (ModelUtils .isLongSchema (p )) {
229
230
Long def = (Long ) p .getDefault ();
230
231
out = def == null ? out : def .toString () + "L" ;
Original file line number Diff line number Diff line change 1
- 3.2.0 -SNAPSHOT
1
+ 3.3.3 -SNAPSHOT
You can’t perform that action at this time.
0 commit comments