mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
Revert "add method to return the title"
This reverts commit 090f1b31ba675eebc2fcb4d2032d4bf11336f993.
This commit is contained in:
parent
0338d84274
commit
8084e6722b
@ -8480,17 +8480,4 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
operation.hasParams = !operation.allParams.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the title in the info section of the spec or default to openapi if not defined.
|
||||
*
|
||||
* @return title
|
||||
*/
|
||||
protected String getInfoTitle() {
|
||||
if (openAPI.getInfo() != null) {
|
||||
return openAPI.getInfo().getTitle();
|
||||
} else {
|
||||
return "openapi"; // default to openapi if title not set
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class ApexClientCodegen extends AbstractApexCodegen {
|
||||
|
||||
@Override
|
||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||
String calloutLabel = getInfoTitle();
|
||||
String calloutLabel = openAPI.getInfo().getTitle();
|
||||
if (StringUtils.isNotBlank(namedCredential)) {
|
||||
calloutLabel = namedCredential;
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
|
||||
|
||||
@Override
|
||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||
String baseTitle = getInfoTitle();
|
||||
String baseTitle = openAPI.getInfo().getTitle();
|
||||
|
||||
if (StringUtils.isBlank(baseTitle)) {
|
||||
baseTitle = "OpenAPI";
|
||||
|
@ -275,7 +275,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
|
||||
@Override
|
||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||
// From the title, compute a reasonable name for the package and the API
|
||||
String title = getInfoTitle();
|
||||
String title = openAPI.getInfo().getTitle();
|
||||
|
||||
// Drop any API suffix
|
||||
if (title == null) {
|
||||
|
@ -471,7 +471,7 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
if (!additionalProperties.containsKey(TITLE)) {
|
||||
// From the title, compute a reasonable name for the package and the
|
||||
// API
|
||||
String title = getInfoTitle();
|
||||
String title = openAPI.getInfo().getTitle();
|
||||
|
||||
// Drop any API suffix
|
||||
if (title != null) {
|
||||
|
@ -771,7 +771,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
||||
// This is an additional step we add when pre-processing the API spec, if
|
||||
// there is no user configuration set for the `title` of the project,
|
||||
// we try build and normalise a title from the API spec itself.
|
||||
String title = getInfoTitle();
|
||||
String title = openAPI.getInfo().getTitle();
|
||||
|
||||
// Drop any API suffix
|
||||
if (title != null) {
|
||||
|
@ -689,7 +689,7 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
|
||||
if (!additionalProperties.containsKey(TITLE)) {
|
||||
// From the title, compute a reasonable name for the package and the API
|
||||
String title = getInfoTitle();
|
||||
String title = openAPI.getInfo().getTitle();
|
||||
|
||||
// Drop any API suffix
|
||||
if (title != null) {
|
||||
|
@ -230,7 +230,7 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi
|
||||
Markdown markInstance = new Markdown();
|
||||
openAPI.getInfo().setDescription(markInstance.toHtml(currentDescription));
|
||||
} else {
|
||||
LOGGER.error("OpenAPI object description is empty [{}]", getInfoTitle());
|
||||
LOGGER.error("OpenAPI object description is empty [{}]", openAPI.getInfo().getTitle());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user