Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified bin/asciidoc-documentation-petstore.sh
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
@@ -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.*;
Expand All @@ -21,7 +37,7 @@

/**
* basic asciidoc markup generator.
*
*
* @see <a href="https://asciidoctor.org">asciidoctor</a>
*/
public class AsciidocDocumentationCodegen extends DefaultCodegen implements CodegenConfig {
Expand All @@ -34,7 +50,7 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
/**
* Lambda emitting an asciidoc "include::filename.adoc[]" if file is found in
* path. Use:
*
*
* <pre>
* {{#includemarkup}}{{name}}/description.adoc{{/includemarkup}}
* </pre>
Expand Down Expand Up @@ -75,7 +91,7 @@ public void execute(final Template.Fragment frag, final Writer out) throws IOExc

/**
* Lambda emitting an asciidoc "http link" if file is found in path. Use:
*
*
* <pre>
* {{#snippetLink}}markup until koma, /{{name}}.json{{/snippetLink}}
* </pre>
Expand Down Expand Up @@ -136,7 +152,7 @@ public CodegenType getTag() {
/**
* extracted filter value should be relative to be of use as link or include
* file.
*
*
* @param name filename to sanitize
* @return trimmed and striped path part or empty string.
*/
Expand Down Expand Up @@ -184,10 +200,10 @@ public AsciidocDocumentationCodegen() {

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");
Expand Down Expand Up @@ -227,7 +243,6 @@ public void processOpts() {
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);
Expand All @@ -237,7 +252,6 @@ public void processOpts() {
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);
Expand All @@ -249,10 +263,10 @@ public void processOpts() {
@Override
public void processOpenAPI(OpenAPI openAPI) {
if (this.includeSpecMarkupLambda != null) {
LOGGER.info("specs: " + ": " + this.includeSpecMarkupLambda.resetCounter());
LOGGER.debug("specs: " + ": " + this.includeSpecMarkupLambda.resetCounter());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@man-at-home I changed these to LOGGER.debug. Hope that's ok with you.

}
if (this.includeSnippetMarkupLambda != null) {
LOGGER.info("snippets: " + ": " + this.includeSnippetMarkupLambda.resetCounter());
LOGGER.debug("snippets: " + ": " + this.includeSnippetMarkupLambda.resetCounter());
}
super.processOpenAPI(openAPI);
}
Expand Down
2 changes: 1 addition & 1 deletion samples/documentation/asciidoc/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
unset
4.1.3-SNAPSHOT
Loading