[asciidoc] Allow the inclusion of additional documentation to t… (#5260)

* [asccidoc] Allow the inclusion of additional documentation to the asccidoc generated

Resolves #5228
This commit is contained in:
LEZIER-S2 2020-03-24 03:22:40 +01:00 committed by GitHub
parent 6bf432a1d9
commit dec57d375e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 301 additions and 283 deletions

View File

@ -62,9 +62,11 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
private long includeCount = 0; private long includeCount = 0;
private long notFoundCount = 0; private long notFoundCount = 0;
private String attributePathReference;
private String basePath; private String basePath;
public IncludeMarkupLambda(final String basePath) { public IncludeMarkupLambda(final String attributePathReference, final String basePath) {
this.attributePathReference = attributePathReference;
this.basePath = basePath; this.basePath = basePath;
} }
@ -81,15 +83,19 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
final String relativeFileName = AsciidocDocumentationCodegen.sanitize(frag.execute()); final String relativeFileName = AsciidocDocumentationCodegen.sanitize(frag.execute());
final Path filePathToInclude = Paths.get(basePath, relativeFileName).toAbsolutePath(); final Path filePathToInclude = Paths.get(basePath, relativeFileName).toAbsolutePath();
String includeStatement = "include::{" + attributePathReference + "}" + escapeCurlyBrackets(relativeFileName) + "[opts=optional]";
if (Files.isRegularFile(filePathToInclude)) { if (Files.isRegularFile(filePathToInclude)) {
LOGGER.debug( LOGGER.debug("including " + ++includeCount + ". file into markup from: " + filePathToInclude.toString());
"including " + ++includeCount + ". file into markup from: " + filePathToInclude.toString()); out.write("\n" + includeStatement + "\n");
out.write("\ninclude::" + relativeFileName + "[opts=optional]\n");
} else { } else {
LOGGER.debug(++notFoundCount + ". file not found, skip include for: " + filePathToInclude.toString()); 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()); + Paths.get(specDir).toAbsolutePath());
} }
this.includeSpecMarkupLambda = new IncludeMarkupLambda(specDir); this.includeSpecMarkupLambda = new IncludeMarkupLambda(SPEC_DIR,specDir);
additionalProperties.put("specinclude", this.includeSpecMarkupLambda); additionalProperties.put("specinclude", this.includeSpecMarkupLambda);
String snippetDir = this.additionalProperties.get(SNIPPET_DIR) + ""; String snippetDir = this.additionalProperties.get(SNIPPET_DIR) + "";
@ -279,7 +285,7 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
+ Paths.get(snippetDir).toAbsolutePath()); + Paths.get(snippetDir).toAbsolutePath());
} }
this.includeSnippetMarkupLambda = new IncludeMarkupLambda(snippetDir); this.includeSnippetMarkupLambda = new IncludeMarkupLambda(SNIPPET_DIR,snippetDir);
additionalProperties.put("snippetinclude", this.includeSnippetMarkupLambda); additionalProperties.put("snippetinclude", this.includeSnippetMarkupLambda);
this.linkSnippetMarkupLambda = new LinkMarkupLambda(snippetDir); this.linkSnippetMarkupLambda = new LinkMarkupLambda(snippetDir);

View File

@ -1,146 +1,140 @@
package org.openapitools.codegen.asciidoc; package org.openapitools.codegen.asciidoc;
import java.io.File; import java.io.File;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.List; import java.util.List;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.languages.AsciidocDocumentationCodegen; import org.openapitools.codegen.languages.AsciidocDocumentationCodegen;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterClass; import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
/** several asciidoc content checks with sample openapi v3. */ /** several asciidoc content checks with sample openapi v3. */
public class AsciidocSampleGeneratorTest { public class AsciidocSampleGeneratorTest {
public String markupContent = null; public String markupContent = null;
public String markupFileName = null; public String markupFileName = null;
File specDir = new File("src/test/resources/3_0/asciidoc/specs/"); File specDir = new File("src/test/resources/3_0/asciidoc/specs/");
File snippetDir = new File("src/test/resources/3_0/asciidoc/generated-snippets/"); File snippetDir = new File("src/test/resources/3_0/asciidoc/generated-snippets/");
@BeforeClass @BeforeClass
public void beforeClassGenerateTestMarkup() throws Exception { public void beforeClassGenerateTestMarkup() throws Exception {
File outputTempDirectory = Files.createTempDirectory("test-asciidoc-sample-generator.").toFile(); File outputTempDirectory = Files.createTempDirectory("test-asciidoc-sample-generator.").toFile();
Assert.assertTrue(specDir.exists(), "test cancel, not specDir found to use." + specDir.getPath()); 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()); Assert.assertTrue(snippetDir.exists(), "test cancel, not snippedDir found to use." + snippetDir.getPath());
final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc") final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc")
.setInputSpec("src/test/resources/3_0/asciidoc/api-docs.json") .setInputSpec("src/test/resources/3_0/asciidoc/api-docs.json")
.setOutputDir(outputTempDirectory.getAbsolutePath()) .setOutputDir(outputTempDirectory.getAbsolutePath())
.addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, specDir.toString()) .addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, specDir.toString())
.addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, snippetDir.toString()); .addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, snippetDir.toString());
DefaultGenerator generator = new DefaultGenerator(); DefaultGenerator generator = new DefaultGenerator();
List<File> files = generator.opts(configurator.toClientOptInput()).generate(); List<File> files = generator.opts(configurator.toClientOptInput()).generate();
for (File file : files) { for (File file : files) {
if (file.getName().equals("index.adoc")) { if (file.getName().equals("index.adoc")) {
this.markupFileName = file.getAbsoluteFile().toString(); this.markupFileName = file.getAbsoluteFile().toString();
this.markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8); this.markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
} }
} }
} }
@AfterClass @AfterClass
public void afterClassCleanUpTestMarkup() throws Exception { public void afterClassCleanUpTestMarkup() throws Exception {
if (this.markupFileName != null) { if (this.markupFileName != null) {
Files.deleteIfExists(Paths.get(this.markupFileName)); Files.deleteIfExists(Paths.get(this.markupFileName));
} }
} }
@Test @Test
public void testMarkupExistence() { public void testMarkupExistence() {
Assert.assertNotNull(this.markupContent, "asciidoc content index.adoc not created."); Assert.assertNotNull(this.markupContent, "asciidoc content index.adoc not created.");
} }
/** /**
* ensure api-docs.json includes sample and spec files directory as attributes. * ensure api-docs.json includes sample and spec files directory as attributes.
* @throws Exception exception */
*/ @Test
@Test public void testSampleAsciidocMarkupGenerationFromJsonWithAttributes() {
public void testSampleAsciidocMarkupGenerationFromJsonWithAttributes() throws Exception { Assert.assertTrue(markupContent.contains(":specDir: " + specDir.toString()),
Assert.assertTrue(markupContent.contains(":specDir: " + specDir.toString()), "expected :specDir: in: " + markupContent.substring(0, 350));
"expected :specDir: in: " + markupContent.substring(0, 350)); Assert.assertTrue(markupContent.contains(":snippetDir: " + snippetDir.toString()),
Assert.assertTrue(markupContent.contains(":snippetDir: " + snippetDir.toString()), "expected :snippetDir: in: " + markupContent.substring(0, 350));
"expected :snippetDir: in: " + markupContent.substring(0, 350)); }
}
/**
/** * ensure api-docs.json includes sample and spec files into markup.
* ensure api-docs.json includes sample and spec files into markup. */
* @throws Exception exception @Test
*/ public void testSampleAsciidocMarkupGenerationFromJsonWithIncludes() {
@Test
public void testSampleAsciidocMarkupGenerationFromJsonWithIncludes() throws Exception { // include correct markup from separate directories, relative links
Assert.assertTrue(markupContent.contains("include::{specDir}rest/project/GET/spec.adoc["),
// include correct markup from separate directories, relative links "expected project spec.adoc to be included in " + markupFileName);
Assert.assertTrue(markupContent.contains("include::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::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::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("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);
Assert.assertTrue(markupContent.contains("link:rest/project/GET/GET.json["), }
"expected link: not found in file: " + markupFileName);
} /**
* markup doc header content.
/** */
* markup doc header content. @Test
* @throws Exception exception public void testSampleAsciidocMarkupGenerationFromJsonWithContent() {
*/ Assert.assertTrue(markupContent.contains("= time@work rest api"),
@Test "missing main header for api spec from json: " + markupContent.substring(0, 100));
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.
*/
/** @Test
* fix: parameter name unchanged. public void testSampleAsciidocMarkupGenerationParameterNameUnchanged() {
* @throws Exception exception Assert.assertTrue(markupContent.contains("from-iso-date-string"),
*/ "keep parameter name from-iso-date-string unchanged.");
@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.
} */
@Test
/** public void testSampleAsciidocMarkupGenerationAccessApiKey() {
* added apikey info in access section. Assert.assertTrue(markupContent.contains("*APIKey*"),
* @throws Exception exception "access section mit apikey expected.");
*/ Assert.assertFalse(markupContent.contains("*OAuth*"),
@Test "access section no oauth expected.");
public void testSampleAsciidocMarkupGenerationAccessApiKey() throws Exception { Assert.assertFalse(markupContent.contains("*HTTP Basic*"),
Assert.assertTrue(markupContent.contains("*APIKey*"), "access section no http basic expected.");
"access section mit apikey expected."); }
Assert.assertFalse(markupContent.contains("*OAuth*"),
"access section no oauth expected."); /**
Assert.assertFalse(markupContent.contains("*HTTP Basic*"), * no form params in this sample spec.
"access section no http basic expected."); */
} @Test
public void testSampleAsciidocMarkupGenerationWithoutFormParameter() {
/** Assert.assertFalse(markupContent.contains("= Form Parameter"),
* no form params in this sample spec. "no form parameters in this openapi spec expected.");
* @throws Exception exception }
*/
@Test }
public void testSampleAsciidocMarkupGenerationWithoutFormParameter() throws Exception {
Assert.assertFalse(markupContent.contains("= Form Parameter"),
"no form parameters in this openapi spec expected.");
}
}

View File

@ -1,48 +1,66 @@
package org.openapitools.codegen.asciidoc; package org.openapitools.codegen.asciidoc;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.nio.file.Files;
import java.util.Map;
import org.mockito.MockitoAnnotations;
import org.openapitools.codegen.languages.AsciidocDocumentationCodegen; import org.mockito.MockitoAnnotations;
import org.openapitools.codegen.templating.mustache.LambdaTest; import org.openapitools.codegen.languages.AsciidocDocumentationCodegen;
import org.testng.annotations.BeforeMethod; import org.openapitools.codegen.templating.mustache.LambdaTest;
import org.testng.annotations.Test; import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.Assert;
import org.testng.Assert;
public class IncludeMarkupFilterTest extends LambdaTest {
public class IncludeMarkupFilterTest extends LambdaTest {
@BeforeMethod
public void setup() { @BeforeMethod
MockitoAnnotations.initMocks(this); public void setup() {
} MockitoAnnotations.initMocks(this);
}
@Test
public void testIncludeMarkupFilterDoesNotIncludeMissingFile() { @Test
public void testIncludeMarkupFilterDoesNotIncludeMissingFile() {
final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
final Map<String, Object> ctx = context("specinclude", generator.new IncludeMarkupLambda("DOES_NOT_EXIST")); final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
final Map<String, Object> 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 ::not.an.existing.file.adoc["), final String result = execute("{{#specinclude}}not.an.existing.file.adoc{{/specinclude}}", ctx);
"unexpected filtered " + result); 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 { @Test
public void testIncludeMarkupFilterFoundFileOk() throws IOException {
File tempFile = File.createTempFile("IncludeMarkupFilterTestDummyfile", "-adoc");
tempFile.deleteOnExit(); File tempFile = File.createTempFile("IncludeMarkupFilterTestDummyfile", "-adoc");
tempFile.deleteOnExit();
final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
final Map<String, Object> ctx = context("snippetinclude", final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
generator.new IncludeMarkupLambda(tempFile.getParent())); final Map<String, Object> ctx = context("snippetinclude",
generator.new IncludeMarkupLambda("specDir",tempFile.getParent()));
final String result = execute("{{#snippetinclude}}" + tempFile.getName() + "{{/snippetinclude}}", ctx);
Assert.assertTrue(result.contains("include::"), "unexpected filtered: " + result); final String result = execute("{{#snippetinclude}}" + tempFile.getName() + "{{/snippetinclude}}", ctx);
Assert.assertTrue(result.contains(tempFile.getName()), "unexpected filtered: " + result); 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<String, Object> 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");
}
}

View File

@ -1 +1 @@
4.2.3-SNAPSHOT 4.3.0-SNAPSHOT

View File

@ -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. 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 == 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] endif::internal-generation[]
@ -220,7 +220,7 @@ Finds Pets by status
Multiple status values can be provided with comma separated strings 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[<<Pet>>]
===== Samples ===== 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[<<Pet>>]
ifdef::internal-generation[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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. 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[<<Pet>>]
===== Samples ===== 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[<<Pet>>]
ifdef::internal-generation[] ifdef::internal-generation[]
===== Implementation ===== 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[] endif::internal-generation[]
@ -396,7 +396,7 @@ Find pet by ID
Returns a single pet 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] endif::internal-generation[]
@ -868,7 +868,7 @@ Returns pet inventories by status
Returns a map of status codes to quantities 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] endif::internal-generation[]
@ -1123,7 +1123,7 @@ Create user
This can only be done by the logged in 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] endif::internal-generation[]
@ -1363,7 +1363,7 @@ Delete user
This can only be done by the logged in 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] endif::internal-generation[]
@ -1703,7 +1703,7 @@ Updated user
This can only be done by the logged in 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 ===== 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[] ifdef::internal-generation[]
===== Implementation ===== 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[] endif::internal-generation[]