mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-28 04:20:51 +00:00
Improvements on scala http4s server generator (#17693)
* improvements on scala https server generator * trigger dockerfile build
This commit is contained in:
parent
6a8ca1018f
commit
f31164b569
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||||
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
@ -141,7 +143,6 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC
|
|||||||
additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html");
|
additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
languageSpecificPrimitives = new HashSet<>(
|
languageSpecificPrimitives = new HashSet<>(
|
||||||
Arrays.asList(
|
Arrays.asList(
|
||||||
"String",
|
"String",
|
||||||
@ -197,6 +198,7 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final static Map<String, String> locationStatusToResponse = new HashMap<>();
|
private final static Map<String, String> locationStatusToResponse = new HashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
locationStatusToResponse.put("300", "MultipleChoices");
|
locationStatusToResponse.put("300", "MultipleChoices");
|
||||||
locationStatusToResponse.put("301", "MovedPermanently");
|
locationStatusToResponse.put("301", "MovedPermanently");
|
||||||
@ -207,16 +209,19 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final static Map<String, String> wwwAuthStatusToResponse = new HashMap<>();
|
private final static Map<String, String> wwwAuthStatusToResponse = new HashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
wwwAuthStatusToResponse.put("401", "Unauthorized");
|
wwwAuthStatusToResponse.put("401", "Unauthorized");
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static Map<String, String> allowStatusToResponse = new HashMap<>();
|
private final static Map<String, String> allowStatusToResponse = new HashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
allowStatusToResponse.put("405", "MethodNotAllowed");
|
allowStatusToResponse.put("405", "MethodNotAllowed");
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static Map<String, String> proxyAuthStatusToResponse = new HashMap<>();
|
private final static Map<String, String> proxyAuthStatusToResponse = new HashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
proxyAuthStatusToResponse.put("407", "ProxyAuthenticationRequired");
|
proxyAuthStatusToResponse.put("407", "ProxyAuthenticationRequired");
|
||||||
}
|
}
|
||||||
@ -333,7 +338,7 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postProcessFile(File file, String fileType) {
|
public void postProcessFile(File file, String fileType) {
|
||||||
System.out.println("postprocess " + file.toString());
|
LOGGER.debug("postprocess " + file.toString());
|
||||||
super.postProcessFile(file, fileType);
|
super.postProcessFile(file, fileType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -848,5 +853,7 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.SCALA; }
|
public GeneratorLanguage generatorLanguage() {
|
||||||
|
return GeneratorLanguage.SCALA;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
2
pom.xml
2
pom.xml
@ -414,7 +414,6 @@
|
|||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>release</id>
|
<id>release</id>
|
||||||
<build>
|
<build>
|
||||||
@ -447,7 +446,6 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>release-sign-artifacts</id>
|
<id>release-sign-artifacts</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user