mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 14:40:53 +00:00
Minor improvement to asciidoc doc generator (#3889)
* minor improvement to asciidoc geneator * remove empty line
This commit is contained in:
parent
8055231400
commit
e0b56502a3
0
bin/asciidoc-documentation-petstore.sh
Normal file → Executable file
0
bin/asciidoc-documentation-petstore.sh
Normal file → Executable file
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import org.openapitools.codegen.*;
|
||||
@ -184,10 +200,10 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
|
||||
|
||||
cliOptions.add(new CliOption(SNIPPET_DIR,
|
||||
"path with includable markup snippets (e.g. test output generated by restdoc, default: .")
|
||||
.defaultValue("."));
|
||||
.defaultValue("."));
|
||||
cliOptions.add(new CliOption(SPEC_DIR,
|
||||
"path with includable markup spec files (e.g. handwritten additional docs, default: .")
|
||||
.defaultValue(".."));
|
||||
.defaultValue(".."));
|
||||
|
||||
additionalProperties.put("appName", "OpenAPI Sample description");
|
||||
additionalProperties.put("appDescription", "A sample OpenAPI documentation");
|
||||
@ -227,7 +243,6 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
|
||||
LOGGER.warn("base part for include markup lambda not found: " + specDir + " as "
|
||||
+ Paths.get(specDir).toAbsolutePath());
|
||||
}
|
||||
;
|
||||
|
||||
this.includeSpecMarkupLambda = new IncludeMarkupLambda(specDir);
|
||||
additionalProperties.put("specinclude", this.includeSpecMarkupLambda);
|
||||
@ -237,7 +252,6 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
|
||||
LOGGER.warn("base part for include markup lambda not found: " + snippetDir + " as "
|
||||
+ Paths.get(snippetDir).toAbsolutePath());
|
||||
}
|
||||
;
|
||||
|
||||
this.includeSnippetMarkupLambda = new IncludeMarkupLambda(snippetDir);
|
||||
additionalProperties.put("snippetinclude", this.includeSnippetMarkupLambda);
|
||||
@ -249,10 +263,10 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
|
||||
@Override
|
||||
public void processOpenAPI(OpenAPI openAPI) {
|
||||
if (this.includeSpecMarkupLambda != null) {
|
||||
LOGGER.info("specs: " + ": " + this.includeSpecMarkupLambda.resetCounter());
|
||||
LOGGER.debug("specs: " + ": " + this.includeSpecMarkupLambda.resetCounter());
|
||||
}
|
||||
if (this.includeSnippetMarkupLambda != null) {
|
||||
LOGGER.info("snippets: " + ": " + this.includeSnippetMarkupLambda.resetCounter());
|
||||
LOGGER.debug("snippets: " + ": " + this.includeSnippetMarkupLambda.resetCounter());
|
||||
}
|
||||
super.processOpenAPI(openAPI);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
unset
|
||||
4.1.3-SNAPSHOT
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user