@@ -333,13 +333,14 @@ public void preprocessOpenAPI(OpenAPI openAPI) {
333
333
334
334
/**
335
335
* Internal method to set the generateToSchema parameter.
336
- *
336
+ * <p>
337
337
* Basically we're generating ToSchema instances (generically) for all schemas.
338
338
* However, if any of the contained datatypes doesn't have the ToSchema instance,
339
339
* we cannot generate it for its "ancestor" type.
340
340
* This is the case with the "Data.Aeson.Value" type: it doesn't (and cannot) have
341
341
* a Swagger-compatible ToSchema instance. So we have to detect its presence "downstream"
342
342
* the current schema, and if we find it we just don't generate any ToSchema instance.
343
+ *
343
344
* @param model
344
345
*/
345
346
private void setGenerateToSchema (CodegenModel model ) {
@@ -356,7 +357,7 @@ private void setGenerateToSchema(CodegenModel model) {
356
357
357
358
List <CodegenModel > children = model .getChildren ();
358
359
if (children != null ) {
359
- for (CodegenModel child : children ) {
360
+ for (CodegenModel child : children ) {
360
361
setGenerateToSchema (child );
361
362
}
362
363
}
@@ -512,7 +513,7 @@ public CodegenOperation fromOperation(String resourcePath, String httpMethod, Op
512
513
// Query parameters appended to routes
513
514
for (CodegenParameter param : op .queryParams ) {
514
515
String paramType = param .dataType ;
515
- if (param . contentType == "application/json" ) {
516
+ if ("application/json" . equals ( param . contentType ) ) {
516
517
if (param .isArray ) {
517
518
paramType = "[JSONQueryParam " + paramType .substring (1 , paramType .length () - 1 ) + "]" ;
518
519
} else {
@@ -554,7 +555,7 @@ public CodegenOperation fromOperation(String resourcePath, String httpMethod, Op
554
555
path .add ("Header \" " + param .baseName + "\" " + param .dataType );
555
556
556
557
String paramType = param .dataType ;
557
- if (param . contentType == "application/json" ) {
558
+ if ("application/json" . equals ( param . contentType ) ) {
558
559
if (param .isArray ) {
559
560
paramType = "(JSONQueryParam " + paramType .substring (1 , paramType .length () - 1 ) + ")" ;
560
561
} else {
@@ -721,5 +722,7 @@ public void postProcessFile(File file, String fileType) {
721
722
}
722
723
723
724
@ Override
724
- public GeneratorLanguage generatorLanguage () { return GeneratorLanguage .HASKELL ; }
725
+ public GeneratorLanguage generatorLanguage () {
726
+ return GeneratorLanguage .HASKELL ;
727
+ }
725
728
}
0 commit comments