diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java index 9421ae29866..f8808929a36 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java @@ -62,9 +62,11 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code private long includeCount = 0; private long notFoundCount = 0; + private String attributePathReference; private String basePath; - public IncludeMarkupLambda(final String basePath) { + public IncludeMarkupLambda(final String attributePathReference, final String basePath) { + this.attributePathReference = attributePathReference; this.basePath = basePath; } @@ -81,15 +83,19 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code final String relativeFileName = AsciidocDocumentationCodegen.sanitize(frag.execute()); final Path filePathToInclude = Paths.get(basePath, relativeFileName).toAbsolutePath(); + String includeStatement = "include::{" + attributePathReference + "}" + escapeCurlyBrackets(relativeFileName) + "[opts=optional]"; if (Files.isRegularFile(filePathToInclude)) { - LOGGER.debug( - "including " + ++includeCount + ". file into markup from: " + filePathToInclude.toString()); - out.write("\ninclude::" + relativeFileName + "[opts=optional]\n"); + LOGGER.debug("including " + ++includeCount + ". file into markup from: " + filePathToInclude.toString()); + out.write("\n" + includeStatement + "\n"); } else { LOGGER.debug(++notFoundCount + ". file not found, skip include for: " + filePathToInclude.toString()); - out.write("\n// markup not found, no include ::" + relativeFileName + "[opts=optional]\n"); + out.write("\n// markup not found, no " + includeStatement + "\n"); } } + + private String escapeCurlyBrackets(String relativeFileName) { + return relativeFileName.replaceAll("\\{","\\\\{").replaceAll("\\}","\\\\}"); + } } /** @@ -270,7 +276,7 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code + Paths.get(specDir).toAbsolutePath()); } - this.includeSpecMarkupLambda = new IncludeMarkupLambda(specDir); + this.includeSpecMarkupLambda = new IncludeMarkupLambda(SPEC_DIR,specDir); additionalProperties.put("specinclude", this.includeSpecMarkupLambda); String snippetDir = this.additionalProperties.get(SNIPPET_DIR) + ""; @@ -279,7 +285,7 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code + Paths.get(snippetDir).toAbsolutePath()); } - this.includeSnippetMarkupLambda = new IncludeMarkupLambda(snippetDir); + this.includeSnippetMarkupLambda = new IncludeMarkupLambda(SNIPPET_DIR,snippetDir); additionalProperties.put("snippetinclude", this.includeSnippetMarkupLambda); this.linkSnippetMarkupLambda = new LinkMarkupLambda(snippetDir); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/AsciidocSampleGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/AsciidocSampleGeneratorTest.java index 73fa7803d4c..4206c8c7f17 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/AsciidocSampleGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/AsciidocSampleGeneratorTest.java @@ -1,146 +1,140 @@ -package org.openapitools.codegen.asciidoc; - -import java.io.File; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.List; - -import org.apache.commons.io.FileUtils; - -import org.openapitools.codegen.DefaultGenerator; -import org.openapitools.codegen.config.CodegenConfigurator; -import org.openapitools.codegen.languages.AsciidocDocumentationCodegen; -import org.testng.Assert; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -/** several asciidoc content checks with sample openapi v3. */ -public class AsciidocSampleGeneratorTest { - - public String markupContent = null; - public String markupFileName = null; - - File specDir = new File("src/test/resources/3_0/asciidoc/specs/"); - File snippetDir = new File("src/test/resources/3_0/asciidoc/generated-snippets/"); - - @BeforeClass - public void beforeClassGenerateTestMarkup() throws Exception { - - File outputTempDirectory = Files.createTempDirectory("test-asciidoc-sample-generator.").toFile(); - - Assert.assertTrue(specDir.exists(), "test cancel, not specDir found to use." + specDir.getPath()); - Assert.assertTrue(snippetDir.exists(), "test cancel, not snippedDir found to use." + snippetDir.getPath()); - - final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc") - .setInputSpec("src/test/resources/3_0/asciidoc/api-docs.json") - .setOutputDir(outputTempDirectory.getAbsolutePath()) - .addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, specDir.toString()) - .addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, snippetDir.toString()); - - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(configurator.toClientOptInput()).generate(); - - for (File file : files) { - if (file.getName().equals("index.adoc")) { - this.markupFileName = file.getAbsoluteFile().toString(); - this.markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8); - } - } - } - - @AfterClass - public void afterClassCleanUpTestMarkup() throws Exception { - if (this.markupFileName != null) { - Files.deleteIfExists(Paths.get(this.markupFileName)); - } - } - - @Test - public void testMarkupExistence() { - Assert.assertNotNull(this.markupContent, "asciidoc content index.adoc not created."); - } - - /** - * ensure api-docs.json includes sample and spec files directory as attributes. - * @throws Exception exception - */ - @Test - public void testSampleAsciidocMarkupGenerationFromJsonWithAttributes() throws Exception { - Assert.assertTrue(markupContent.contains(":specDir: " + specDir.toString()), - "expected :specDir: in: " + markupContent.substring(0, 350)); - Assert.assertTrue(markupContent.contains(":snippetDir: " + snippetDir.toString()), - "expected :snippetDir: in: " + markupContent.substring(0, 350)); - } - - /** - * ensure api-docs.json includes sample and spec files into markup. - * @throws Exception exception - */ - @Test - public void testSampleAsciidocMarkupGenerationFromJsonWithIncludes() throws Exception { - - // include correct markup from separate directories, relative links - Assert.assertTrue(markupContent.contains("include::rest/project/GET/spec.adoc["), - "expected project spec.adoc to be included in " + markupFileName); - - Assert.assertTrue(markupContent.contains("include::rest/project/GET/implementation.adoc["), - "expected project implementation.adoc to be included in " + markupFileName); - - Assert.assertTrue(markupContent.contains("include::rest/project/GET/http-request.adoc["), - "expected project http-request.adoc to be included in " + markupFileName); - - Assert.assertTrue(markupContent.contains("include::rest/project/GET/http-response.adoc["), - "expected project http-response.adoc to be included in " + markupFileName); - - Assert.assertTrue(markupContent.contains("link:rest/project/GET/GET.json["), - "expected link: not found in file: " + markupFileName); - } - - /** - * markup doc header content. - * @throws Exception exception - */ - @Test - public void testSampleAsciidocMarkupGenerationFromJsonWithContent() throws Exception { - Assert.assertTrue(markupContent.contains("= time@work rest api"), - "missing main header for api spec from json: " + markupContent.substring(0, 100)); - - } - - /** - * fix: parameter name unchanged. - * @throws Exception exception - */ - @Test - public void testSampleAsciidocMarkupGenerationParameterNameUnchanged() throws Exception { - Assert.assertTrue(markupContent.contains("from-iso-date-string"), - "keep parameter name from-iso-date-string unchanged."); - } - - /** - * added apikey info in access section. - * @throws Exception exception - */ - @Test - public void testSampleAsciidocMarkupGenerationAccessApiKey() throws Exception { - Assert.assertTrue(markupContent.contains("*APIKey*"), - "access section mit apikey expected."); - Assert.assertFalse(markupContent.contains("*OAuth*"), - "access section no oauth expected."); - Assert.assertFalse(markupContent.contains("*HTTP Basic*"), - "access section no http basic expected."); - } - - /** - * no form params in this sample spec. - * @throws Exception exception - */ - @Test - public void testSampleAsciidocMarkupGenerationWithoutFormParameter() throws Exception { - Assert.assertFalse(markupContent.contains("= Form Parameter"), - "no form parameters in this openapi spec expected."); - } - -} +package org.openapitools.codegen.asciidoc; + +import java.io.File; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; + +import org.apache.commons.io.FileUtils; + +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.languages.AsciidocDocumentationCodegen; +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** several asciidoc content checks with sample openapi v3. */ +public class AsciidocSampleGeneratorTest { + + public String markupContent = null; + public String markupFileName = null; + + File specDir = new File("src/test/resources/3_0/asciidoc/specs/"); + File snippetDir = new File("src/test/resources/3_0/asciidoc/generated-snippets/"); + + @BeforeClass + public void beforeClassGenerateTestMarkup() throws Exception { + + File outputTempDirectory = Files.createTempDirectory("test-asciidoc-sample-generator.").toFile(); + + Assert.assertTrue(specDir.exists(), "test cancel, not specDir found to use." + specDir.getPath()); + Assert.assertTrue(snippetDir.exists(), "test cancel, not snippedDir found to use." + snippetDir.getPath()); + + final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc") + .setInputSpec("src/test/resources/3_0/asciidoc/api-docs.json") + .setOutputDir(outputTempDirectory.getAbsolutePath()) + .addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, specDir.toString()) + .addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, snippetDir.toString()); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + + for (File file : files) { + if (file.getName().equals("index.adoc")) { + this.markupFileName = file.getAbsoluteFile().toString(); + this.markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8); + } + } + } + + @AfterClass + public void afterClassCleanUpTestMarkup() throws Exception { + if (this.markupFileName != null) { + Files.deleteIfExists(Paths.get(this.markupFileName)); + } + } + + @Test + public void testMarkupExistence() { + Assert.assertNotNull(this.markupContent, "asciidoc content index.adoc not created."); + } + + /** + * ensure api-docs.json includes sample and spec files directory as attributes. + */ + @Test + public void testSampleAsciidocMarkupGenerationFromJsonWithAttributes() { + Assert.assertTrue(markupContent.contains(":specDir: " + specDir.toString()), + "expected :specDir: in: " + markupContent.substring(0, 350)); + Assert.assertTrue(markupContent.contains(":snippetDir: " + snippetDir.toString()), + "expected :snippetDir: in: " + markupContent.substring(0, 350)); + } + + /** + * ensure api-docs.json includes sample and spec files into markup. + */ + @Test + public void testSampleAsciidocMarkupGenerationFromJsonWithIncludes() { + + // include correct markup from separate directories, relative links + Assert.assertTrue(markupContent.contains("include::{specDir}rest/project/GET/spec.adoc["), + "expected project spec.adoc to be included in " + markupFileName); + + Assert.assertTrue(markupContent.contains("include::{specDir}rest/project/GET/implementation.adoc["), + "expected project implementation.adoc to be included in " + markupFileName); + + Assert.assertTrue(markupContent.contains("include::{snippetDir}rest/project/GET/http-request.adoc["), + "expected project http-request.adoc to be included in " + markupFileName); + + Assert.assertTrue(markupContent.contains("include::{snippetDir}rest/project/GET/http-response.adoc["), + "expected project http-response.adoc to be included in " + markupFileName); + + Assert.assertTrue(markupContent.contains("link:rest/project/GET/GET.json["), + "expected link: not found in file: " + markupFileName); + } + + /** + * markup doc header content. + */ + @Test + public void testSampleAsciidocMarkupGenerationFromJsonWithContent() { + Assert.assertTrue(markupContent.contains("= time@work rest api"), + "missing main header for api spec from json: " + markupContent.substring(0, 100)); + + } + + /** + * fix: parameter name unchanged. + */ + @Test + public void testSampleAsciidocMarkupGenerationParameterNameUnchanged() { + Assert.assertTrue(markupContent.contains("from-iso-date-string"), + "keep parameter name from-iso-date-string unchanged."); + } + + /** + * added apikey info in access section. + */ + @Test + public void testSampleAsciidocMarkupGenerationAccessApiKey() { + Assert.assertTrue(markupContent.contains("*APIKey*"), + "access section mit apikey expected."); + Assert.assertFalse(markupContent.contains("*OAuth*"), + "access section no oauth expected."); + Assert.assertFalse(markupContent.contains("*HTTP Basic*"), + "access section no http basic expected."); + } + + /** + * no form params in this sample spec. + */ + @Test + public void testSampleAsciidocMarkupGenerationWithoutFormParameter() { + Assert.assertFalse(markupContent.contains("= Form Parameter"), + "no form parameters in this openapi spec expected."); + } + +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/IncludeMarkupFilterTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/IncludeMarkupFilterTest.java index 0419969ef4f..5ba75947ff4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/IncludeMarkupFilterTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/asciidoc/IncludeMarkupFilterTest.java @@ -1,48 +1,66 @@ -package org.openapitools.codegen.asciidoc; - -import java.io.File; -import java.io.IOException; -import java.util.Map; - -import org.mockito.MockitoAnnotations; -import org.openapitools.codegen.languages.AsciidocDocumentationCodegen; -import org.openapitools.codegen.templating.mustache.LambdaTest; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import org.testng.Assert; - -public class IncludeMarkupFilterTest extends LambdaTest { - - @BeforeMethod - public void setup() { - MockitoAnnotations.initMocks(this); - } - - @Test - public void testIncludeMarkupFilterDoesNotIncludeMissingFile() { - - final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen(); - final Map ctx = context("specinclude", generator.new IncludeMarkupLambda("DOES_NOT_EXIST")); - - final String result = execute("{{#specinclude}}not.an.existing.file.adoc{{/specinclude}}", ctx); - Assert.assertTrue(result.contains("// markup not found, no include ::not.an.existing.file.adoc["), - "unexpected filtered " + result); - } - - @Test - public void testIncludeMarkupFilterFoundFileOk() throws IOException { - - File tempFile = File.createTempFile("IncludeMarkupFilterTestDummyfile", "-adoc"); - tempFile.deleteOnExit(); - - final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen(); - final Map ctx = context("snippetinclude", - generator.new IncludeMarkupLambda(tempFile.getParent())); - - final String result = execute("{{#snippetinclude}}" + tempFile.getName() + "{{/snippetinclude}}", ctx); - Assert.assertTrue(result.contains("include::"), "unexpected filtered: " + result); - Assert.assertTrue(result.contains(tempFile.getName()), "unexpected filtered: " + result); - } - -} +package org.openapitools.codegen.asciidoc; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.Map; + +import org.mockito.MockitoAnnotations; +import org.openapitools.codegen.languages.AsciidocDocumentationCodegen; +import org.openapitools.codegen.templating.mustache.LambdaTest; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import org.testng.Assert; + +public class IncludeMarkupFilterTest extends LambdaTest { + + @BeforeMethod + public void setup() { + MockitoAnnotations.initMocks(this); + } + + @Test + public void testIncludeMarkupFilterDoesNotIncludeMissingFile() { + + final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen(); + final Map ctx = context("specinclude", generator.new IncludeMarkupLambda("specDir","DOES_NOT_EXIST")); + + final String result = execute("{{#specinclude}}not.an.existing.file.adoc{{/specinclude}}", ctx); + Assert.assertTrue(result.contains("// markup not found, no include::{specDir}not.an.existing.file.adoc[opts=optional]"), + "unexpected filtered " + result); + } + + @Test + public void testIncludeMarkupFilterFoundFileOk() throws IOException { + + File tempFile = File.createTempFile("IncludeMarkupFilterTestDummyfile", "-adoc"); + tempFile.deleteOnExit(); + + final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen(); + final Map ctx = context("snippetinclude", + generator.new IncludeMarkupLambda("specDir",tempFile.getParent())); + + final String result = execute("{{#snippetinclude}}" + tempFile.getName() + "{{/snippetinclude}}", ctx); + Assert.assertTrue(result.contains("include::{specDir}"+tempFile.getName()+"[opts=optional]"), "unexpected filtered: " + result); + } + + @Test + public void testIncludeMarkupFilterEscapeCurlyBracketsInOrderToBeParsedByAsciidoc() throws IOException { + String temporaryPath = Files.createTempDirectory(null).toFile().getAbsolutePath(); + String pathWithCurlyBrackets = temporaryPath + "/{parameter1}/{parameter2}"; + File folderWithCurlyBrackets = new File(pathWithCurlyBrackets); + folderWithCurlyBrackets.mkdirs(); + + File tempFile = File.createTempFile("curly", "-adoc", folderWithCurlyBrackets); + tempFile.deleteOnExit(); + + final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen(); + final Map ctx = context("snippetinclude", + generator.new IncludeMarkupLambda("specDir",temporaryPath)); + + final String result = execute("{{#snippetinclude}}" + "/{parameter1}/{parameter2}/"+tempFile.getName() + "{{/snippetinclude}}", ctx); + Assert.assertEquals(result,"\ninclude::{specDir}"+ "\\{parameter1\\}/\\{parameter2\\}/" + tempFile.getName()+"[opts=optional]\n"); + } + +} diff --git a/samples/documentation/asciidoc/.openapi-generator/VERSION b/samples/documentation/asciidoc/.openapi-generator/VERSION index 58592f031f6..bfbf77eb7fa 100644 --- a/samples/documentation/asciidoc/.openapi-generator/VERSION +++ b/samples/documentation/asciidoc/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/documentation/asciidoc/index.adoc b/samples/documentation/asciidoc/index.adoc index 200288b5a5a..15bcb2fe5b7 100644 --- a/samples/documentation/asciidoc/index.adoc +++ b/samples/documentation/asciidoc/index.adoc @@ -17,7 +17,7 @@ team@openapitools.org This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -// markup not found, no include ::intro.adoc[opts=optional] +// markup not found, no include::{specDir}intro.adoc[opts=optional] == Access @@ -47,7 +47,7 @@ Add a new pet to the store -// markup not found, no include ::pet/POST/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/POST/spec.adoc[opts=optional] @@ -96,10 +96,10 @@ Add a new pet to the store ===== Samples -// markup not found, no include ::pet/POST/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/POST/http-request.adoc[opts=optional] -// markup not found, no include ::pet/POST/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/POST/http-response.adoc[opts=optional] @@ -109,7 +109,7 @@ Add a new pet to the store ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/POST/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/POST/implementation.adoc[opts=optional] endif::internal-generation[] @@ -127,7 +127,7 @@ Deletes a pet -// markup not found, no include ::pet/{petId}/DELETE/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/DELETE/spec.adoc[opts=optional] @@ -189,10 +189,10 @@ Deletes a pet ===== Samples -// markup not found, no include ::pet/{petId}/DELETE/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/DELETE/http-request.adoc[opts=optional] -// markup not found, no include ::pet/{petId}/DELETE/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/DELETE/http-response.adoc[opts=optional] @@ -202,7 +202,7 @@ Deletes a pet ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/{petId}/DELETE/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/DELETE/implementation.adoc[opts=optional] endif::internal-generation[] @@ -220,7 +220,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -// markup not found, no include ::pet/findByStatus/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/findByStatus/GET/spec.adoc[opts=optional] @@ -277,10 +277,10 @@ array[<>] ===== Samples -// markup not found, no include ::pet/findByStatus/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/findByStatus/GET/http-request.adoc[opts=optional] -// markup not found, no include ::pet/findByStatus/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/findByStatus/GET/http-response.adoc[opts=optional] @@ -290,7 +290,7 @@ array[<>] ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/findByStatus/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/findByStatus/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -308,7 +308,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -// markup not found, no include ::pet/findByTags/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/findByTags/GET/spec.adoc[opts=optional] @@ -365,10 +365,10 @@ array[<>] ===== Samples -// markup not found, no include ::pet/findByTags/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/findByTags/GET/http-request.adoc[opts=optional] -// markup not found, no include ::pet/findByTags/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/findByTags/GET/http-response.adoc[opts=optional] @@ -378,7 +378,7 @@ array[<>] ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/findByTags/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/findByTags/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -396,7 +396,7 @@ Find pet by ID Returns a single pet -// markup not found, no include ::pet/{petId}/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/GET/spec.adoc[opts=optional] @@ -458,10 +458,10 @@ Returns a single pet ===== Samples -// markup not found, no include ::pet/{petId}/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/GET/http-request.adoc[opts=optional] -// markup not found, no include ::pet/{petId}/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/GET/http-response.adoc[opts=optional] @@ -471,7 +471,7 @@ Returns a single pet ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/{petId}/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -489,7 +489,7 @@ Update an existing pet -// markup not found, no include ::pet/PUT/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/PUT/spec.adoc[opts=optional] @@ -548,10 +548,10 @@ Update an existing pet ===== Samples -// markup not found, no include ::pet/PUT/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/PUT/http-request.adoc[opts=optional] -// markup not found, no include ::pet/PUT/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/PUT/http-response.adoc[opts=optional] @@ -561,7 +561,7 @@ Update an existing pet ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/PUT/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/PUT/implementation.adoc[opts=optional] endif::internal-generation[] @@ -579,7 +579,7 @@ Updates a pet in the store with form data -// markup not found, no include ::pet/{petId}/POST/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/POST/spec.adoc[opts=optional] @@ -647,10 +647,10 @@ Updates a pet in the store with form data ===== Samples -// markup not found, no include ::pet/{petId}/POST/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/POST/http-request.adoc[opts=optional] -// markup not found, no include ::pet/{petId}/POST/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/POST/http-response.adoc[opts=optional] @@ -660,7 +660,7 @@ Updates a pet in the store with form data ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/{petId}/POST/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/POST/implementation.adoc[opts=optional] endif::internal-generation[] @@ -678,7 +678,7 @@ uploads an image -// markup not found, no include ::pet/{petId}/uploadImage/POST/spec.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/uploadImage/POST/spec.adoc[opts=optional] @@ -748,10 +748,10 @@ uploads an image ===== Samples -// markup not found, no include ::pet/{petId}/uploadImage/POST/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/uploadImage/POST/http-request.adoc[opts=optional] -// markup not found, no include ::pet/{petId}/uploadImage/POST/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}pet/\{petId\}/uploadImage/POST/http-response.adoc[opts=optional] @@ -761,7 +761,7 @@ uploads an image ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::pet/{petId}/uploadImage/POST/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}pet/\{petId\}/uploadImage/POST/implementation.adoc[opts=optional] endif::internal-generation[] @@ -783,7 +783,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -// markup not found, no include ::store/order/{orderId}/DELETE/spec.adoc[opts=optional] +// markup not found, no include::{specDir}store/order/\{orderId\}/DELETE/spec.adoc[opts=optional] @@ -837,10 +837,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ===== Samples -// markup not found, no include ::store/order/{orderId}/DELETE/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/order/\{orderId\}/DELETE/http-request.adoc[opts=optional] -// markup not found, no include ::store/order/{orderId}/DELETE/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/order/\{orderId\}/DELETE/http-response.adoc[opts=optional] @@ -850,7 +850,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::store/order/{orderId}/DELETE/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}store/order/\{orderId\}/DELETE/implementation.adoc[opts=optional] endif::internal-generation[] @@ -868,7 +868,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -// markup not found, no include ::store/inventory/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}store/inventory/GET/spec.adoc[opts=optional] @@ -907,10 +907,10 @@ Returns a map of status codes to quantities ===== Samples -// markup not found, no include ::store/inventory/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/inventory/GET/http-request.adoc[opts=optional] -// markup not found, no include ::store/inventory/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/inventory/GET/http-response.adoc[opts=optional] @@ -920,7 +920,7 @@ Returns a map of status codes to quantities ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::store/inventory/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}store/inventory/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -938,7 +938,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -// markup not found, no include ::store/order/{orderId}/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}store/order/\{orderId\}/GET/spec.adoc[opts=optional] @@ -1000,10 +1000,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ===== Samples -// markup not found, no include ::store/order/{orderId}/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/order/\{orderId\}/GET/http-request.adoc[opts=optional] -// markup not found, no include ::store/order/{orderId}/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/order/\{orderId\}/GET/http-response.adoc[opts=optional] @@ -1013,7 +1013,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::store/order/{orderId}/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}store/order/\{orderId\}/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1031,7 +1031,7 @@ Place an order for a pet -// markup not found, no include ::store/order/POST/spec.adoc[opts=optional] +// markup not found, no include::{specDir}store/order/POST/spec.adoc[opts=optional] @@ -1088,10 +1088,10 @@ Place an order for a pet ===== Samples -// markup not found, no include ::store/order/POST/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/order/POST/http-request.adoc[opts=optional] -// markup not found, no include ::store/order/POST/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}store/order/POST/http-response.adoc[opts=optional] @@ -1101,7 +1101,7 @@ Place an order for a pet ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::store/order/POST/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}store/order/POST/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1123,7 +1123,7 @@ Create user This can only be done by the logged in user. -// markup not found, no include ::user/POST/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/POST/spec.adoc[opts=optional] @@ -1172,10 +1172,10 @@ This can only be done by the logged in user. ===== Samples -// markup not found, no include ::user/POST/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/POST/http-request.adoc[opts=optional] -// markup not found, no include ::user/POST/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/POST/http-response.adoc[opts=optional] @@ -1185,7 +1185,7 @@ This can only be done by the logged in user. ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/POST/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/POST/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1203,7 +1203,7 @@ Creates list of users with given input array -// markup not found, no include ::user/createWithArray/POST/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/createWithArray/POST/spec.adoc[opts=optional] @@ -1252,10 +1252,10 @@ Creates list of users with given input array ===== Samples -// markup not found, no include ::user/createWithArray/POST/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/createWithArray/POST/http-request.adoc[opts=optional] -// markup not found, no include ::user/createWithArray/POST/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/createWithArray/POST/http-response.adoc[opts=optional] @@ -1265,7 +1265,7 @@ Creates list of users with given input array ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/createWithArray/POST/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/createWithArray/POST/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1283,7 +1283,7 @@ Creates list of users with given input array -// markup not found, no include ::user/createWithList/POST/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/createWithList/POST/spec.adoc[opts=optional] @@ -1332,10 +1332,10 @@ Creates list of users with given input array ===== Samples -// markup not found, no include ::user/createWithList/POST/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/createWithList/POST/http-request.adoc[opts=optional] -// markup not found, no include ::user/createWithList/POST/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/createWithList/POST/http-response.adoc[opts=optional] @@ -1345,7 +1345,7 @@ Creates list of users with given input array ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/createWithList/POST/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/createWithList/POST/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1363,7 +1363,7 @@ Delete user This can only be done by the logged in user. -// markup not found, no include ::user/{username}/DELETE/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/\{username\}/DELETE/spec.adoc[opts=optional] @@ -1417,10 +1417,10 @@ This can only be done by the logged in user. ===== Samples -// markup not found, no include ::user/{username}/DELETE/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/\{username\}/DELETE/http-request.adoc[opts=optional] -// markup not found, no include ::user/{username}/DELETE/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/\{username\}/DELETE/http-response.adoc[opts=optional] @@ -1430,7 +1430,7 @@ This can only be done by the logged in user. ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/{username}/DELETE/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/\{username\}/DELETE/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1448,7 +1448,7 @@ Get user by user name -// markup not found, no include ::user/{username}/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/\{username\}/GET/spec.adoc[opts=optional] @@ -1510,10 +1510,10 @@ Get user by user name ===== Samples -// markup not found, no include ::user/{username}/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/\{username\}/GET/http-request.adoc[opts=optional] -// markup not found, no include ::user/{username}/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/\{username\}/GET/http-response.adoc[opts=optional] @@ -1523,7 +1523,7 @@ Get user by user name ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/{username}/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/\{username\}/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1541,7 +1541,7 @@ Logs user into the system -// markup not found, no include ::user/login/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/login/GET/spec.adoc[opts=optional] @@ -1605,10 +1605,10 @@ Logs user into the system ===== Samples -// markup not found, no include ::user/login/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/login/GET/http-request.adoc[opts=optional] -// markup not found, no include ::user/login/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/login/GET/http-response.adoc[opts=optional] @@ -1618,7 +1618,7 @@ Logs user into the system ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/login/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/login/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1636,7 +1636,7 @@ Logs out current logged in user session -// markup not found, no include ::user/logout/GET/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/logout/GET/spec.adoc[opts=optional] @@ -1672,10 +1672,10 @@ Logs out current logged in user session ===== Samples -// markup not found, no include ::user/logout/GET/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/logout/GET/http-request.adoc[opts=optional] -// markup not found, no include ::user/logout/GET/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/logout/GET/http-response.adoc[opts=optional] @@ -1685,7 +1685,7 @@ Logs out current logged in user session ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/logout/GET/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/logout/GET/implementation.adoc[opts=optional] endif::internal-generation[] @@ -1703,7 +1703,7 @@ Updated user This can only be done by the logged in user. -// markup not found, no include ::user/{username}/PUT/spec.adoc[opts=optional] +// markup not found, no include::{specDir}user/\{username\}/PUT/spec.adoc[opts=optional] @@ -1770,10 +1770,10 @@ This can only be done by the logged in user. ===== Samples -// markup not found, no include ::user/{username}/PUT/http-request.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/\{username\}/PUT/http-request.adoc[opts=optional] -// markup not found, no include ::user/{username}/PUT/http-response.adoc[opts=optional] +// markup not found, no include::{snippetDir}user/\{username\}/PUT/http-response.adoc[opts=optional] @@ -1783,7 +1783,7 @@ This can only be done by the logged in user. ifdef::internal-generation[] ===== Implementation -// markup not found, no include ::user/{username}/PUT/implementation.adoc[opts=optional] +// markup not found, no include::{specDir}user/\{username\}/PUT/implementation.adoc[opts=optional] endif::internal-generation[]