[asciidoc] fix names of parameters (#4440)

Fixes #4408 

* fix header hierarchy in model section
* small fix markup on dataformat enum (italic)
* fixes parameter names casing
This commit is contained in:
Man 2019-11-10 22:11:55 +01:00 committed by Jim Schubert
parent 7e6e87a857
commit dbbe2b8b2d
9 changed files with 1623 additions and 173 deletions

View File

@ -81,10 +81,10 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
if (Files.isRegularFile(filePathToInclude)) {
LOGGER.debug(
"including " + ++includeCount + ". file into markup from: " + filePathToInclude.toString());
out.write("\ninclude::" + relativeFileName + "[]\n");
out.write("\ninclude::" + relativeFileName + "[opts=optional]\n");
} else {
LOGGER.debug(++notFoundCount + ". file not found, skip include for: " + filePathToInclude.toString());
out.write("\n// markup not found, no include ::" + relativeFileName + "[]\n");
out.write("\n// markup not found, no include ::" + relativeFileName + "[opts=optional]\n");
}
}
}
@ -158,6 +158,8 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code
*/
static String sanitize(final String name) {
String sanitized = name == null ? "" : name.trim();
sanitized = sanitized.replace("//", "/"); // rest paths may or may not end with slashes, leading to redundant
// path separators.
return sanitized.startsWith(File.separator) || sanitized.startsWith("/") ? sanitized.substring(1) : sanitized;
}
@ -200,10 +202,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");

View File

@ -8,7 +8,7 @@
:keywords: openapi, rest, {{appName}}
:specDir: {{specDir}}
:snippetDir: {{snippetDir}}
:generator-template: v1 2019-09-03
:generator-template: v1 2019-11-10
:info-url: {{infoUrl}}
:app-name: {{appName}}

View File

@ -5,7 +5,7 @@
{{#model}}
[#{{classname}}]
==== _{{classname}}_ {{title}}
=== _{{classname}}_ {{title}}
{{unescapedDescription}}
@ -15,11 +15,11 @@
| Field Name| Required| Type| Description| Format
{{#vars}}
| {{name}}
| {{baseName}}
| {{#required}}X{{/required}}
| {{dataType}} {{#isContainer}} of <<{{complexType}}>>{{/isContainer}}
| {{description}}
| {{{dataFormat}}} {{#isEnum}}Enum: _ {{#_enum}}{{this}}, {{/_enum}}{{/isEnum}} _
| {{{dataFormat}}} {{#isEnum}}_Enum:_ {{#_enum}}{{this}}, {{/_enum}}{{/isEnum}}
{{/vars}}
|===

View File

@ -1,4 +1,4 @@
| {{paramName}}
| {{baseName}}
| {{description}} {{#baseType}}<<{{baseType}}>>{{/baseType}}
| {{^required}}-{{/required}}{{#required}}X{{/required}}
| {{defaultValue}}

View File

@ -12,23 +12,25 @@ 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 {
/**
* ensure api-docs.json includes sample and spec files into markup.
* @throws Exception generic exception
*/
@Test
public void testSampleAsciidocMarkupGenerationFromJsonWithSpecsAndSamples() throws Exception {
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();
File specDir = new File("src/test/resources/3_0/asciidoc/specs/");
File snippetDir = new File("src/test/resources/3_0/asciidoc/generated-snippets/");
Assert.assertTrue(specDir.exists(), "test cancel, not specdDir 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());
final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc")
@ -40,46 +42,77 @@ public class AsciidocSampleGeneratorTest {
DefaultGenerator generator = new DefaultGenerator();
List<File> files = generator.opts(configurator.toClientOptInput()).generate();
boolean markupFileGenerated = false;
for (File file : files) {
if (file.getName().equals("index.adoc")) {
markupFileGenerated = true;
String markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
// include correct values from cli.
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));
// 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 " + file.getAbsolutePath());
Assert.assertTrue(markupContent.contains("include::rest/project/GET/implementation.adoc[]"),
"expected project implementation.adoc to be included in " + file.getAbsolutePath());
Assert.assertTrue(markupContent.contains("include::rest/project/GET/http-request.adoc[]"),
"expected project http-request.adoc to be included in " + file.getAbsolutePath());
Assert.assertTrue(markupContent.contains("include::rest/project/GET/http-response.adoc[]"),
"expected project http-response.adoc to be included in " + file.getAbsolutePath());
Assert.assertTrue(markupContent.contains("link:rest/project/GET/GET.json["),
"expected link: not found in file: " + file.getAbsoluteFile());
// extract correct value from json
Assert.assertTrue(markupContent.contains("= time@work rest api"),
"missing main header for api spec from json: " + markupContent.substring(0, 100));
this.markupFileName = file.getAbsoluteFile().toString();
this.markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
}
Files.deleteIfExists(Paths.get(file.getAbsolutePath()));
}
}
Assert.assertTrue(markupFileGenerated, "index.adoc is not generated!");
@AfterClass
public void afterClassCleanUpTestMarkup() throws Exception {
if (this.markupFileName != null) {
Files.deleteIfExists(Paths.get(this.markupFileName));
}
}
Files.deleteIfExists(Paths.get(outputTempDirectory.getAbsolutePath(), ".openapi-generator"));
Files.deleteIfExists(Paths.get(outputTempDirectory.getAbsolutePath()));
@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() 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.
*/
@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.
*/
@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.
*/
@Test
public void testSampleAsciidocMarkupGenerationParameterNameUnchanged() throws Exception {
Assert.assertTrue(markupContent.contains("from-iso-date-string"),
"keep parameter name from-iso-date-string unchanged.");
}
}

View File

@ -26,7 +26,7 @@ public class IncludeMarkupFilterTest extends LambdaTest {
final Map<String, Object> 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[]"),
Assert.assertTrue(result.contains("// markup not found, no include ::not.an.existing.file.adoc["),
"unexpected filtered " + result);
}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
4.1.3-SNAPSHOT
4.2.1-SNAPSHOT

View File

@ -6,9 +6,9 @@ team@openapitools.org
:toclevels: 3
:source-highlighter: highlightjs
:keywords: openapi, rest, OpenAPI Petstore
:specDir: modules/openapi-generator/src/main/resources/asciidoc-documentation
:specDir: modules\openapi-generator\src\main\resources\asciidoc-documentation
:snippetDir: .
:generator-template: v1 2019-09-03
:generator-template: v1 2019-11-10
:info-url: https://openapi-generator.tech
:app-name: OpenAPI Petstore
@ -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[]
// markup not found, no include ::intro.adoc[opts=optional]
== Endpoints
@ -39,7 +39,7 @@ Add a new pet to the store
// markup not found, no include ::pet/POST/spec.adoc[]
// markup not found, no include ::pet/POST/spec.adoc[opts=optional]
@ -87,10 +87,10 @@ Add a new pet to the store
===== Samples
// markup not found, no include ::pet/POST/http-request.adoc[]
// markup not found, no include ::pet/POST/http-request.adoc[opts=optional]
// markup not found, no include ::pet/POST/http-response.adoc[]
// markup not found, no include ::pet/POST/http-response.adoc[opts=optional]
@ -100,7 +100,7 @@ Add a new pet to the store
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/POST/implementation.adoc[]
// markup not found, no include ::pet/POST/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -118,7 +118,7 @@ Deletes a pet
// markup not found, no include ::pet/{petId}/DELETE/spec.adoc[]
// markup not found, no include ::pet/{petId}/DELETE/spec.adoc[opts=optional]
@ -145,7 +145,7 @@ Deletes a pet
|===
|Name| Description| Required| Default| Pattern
| apiKey
| api_key
|
| -
| null
@ -179,10 +179,10 @@ Deletes a pet
===== Samples
// markup not found, no include ::pet/{petId}/DELETE/http-request.adoc[]
// markup not found, no include ::pet/{petId}/DELETE/http-request.adoc[opts=optional]
// markup not found, no include ::pet/{petId}/DELETE/http-response.adoc[]
// markup not found, no include ::pet/{petId}/DELETE/http-response.adoc[opts=optional]
@ -192,7 +192,7 @@ Deletes a pet
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/{petId}/DELETE/implementation.adoc[]
// markup not found, no include ::pet/{petId}/DELETE/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -210,7 +210,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[]
// markup not found, no include ::pet/findByStatus/GET/spec.adoc[opts=optional]
@ -266,10 +266,10 @@ array[<<Pet>>]
===== Samples
// markup not found, no include ::pet/findByStatus/GET/http-request.adoc[]
// markup not found, no include ::pet/findByStatus/GET/http-request.adoc[opts=optional]
// markup not found, no include ::pet/findByStatus/GET/http-response.adoc[]
// markup not found, no include ::pet/findByStatus/GET/http-response.adoc[opts=optional]
@ -279,7 +279,7 @@ array[<<Pet>>]
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/findByStatus/GET/implementation.adoc[]
// markup not found, no include ::pet/findByStatus/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -297,7 +297,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[]
// markup not found, no include ::pet/findByTags/GET/spec.adoc[opts=optional]
@ -353,10 +353,10 @@ array[<<Pet>>]
===== Samples
// markup not found, no include ::pet/findByTags/GET/http-request.adoc[]
// markup not found, no include ::pet/findByTags/GET/http-request.adoc[opts=optional]
// markup not found, no include ::pet/findByTags/GET/http-response.adoc[]
// markup not found, no include ::pet/findByTags/GET/http-response.adoc[opts=optional]
@ -366,7 +366,7 @@ array[<<Pet>>]
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/findByTags/GET/implementation.adoc[]
// markup not found, no include ::pet/findByTags/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -384,7 +384,7 @@ Find pet by ID
Returns a single pet
// markup not found, no include ::pet/{petId}/GET/spec.adoc[]
// markup not found, no include ::pet/{petId}/GET/spec.adoc[opts=optional]
@ -445,10 +445,10 @@ Returns a single pet
===== Samples
// markup not found, no include ::pet/{petId}/GET/http-request.adoc[]
// markup not found, no include ::pet/{petId}/GET/http-request.adoc[opts=optional]
// markup not found, no include ::pet/{petId}/GET/http-response.adoc[]
// markup not found, no include ::pet/{petId}/GET/http-response.adoc[opts=optional]
@ -458,7 +458,7 @@ Returns a single pet
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/{petId}/GET/implementation.adoc[]
// markup not found, no include ::pet/{petId}/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -476,7 +476,7 @@ Update an existing pet
// markup not found, no include ::pet/PUT/spec.adoc[]
// markup not found, no include ::pet/PUT/spec.adoc[opts=optional]
@ -534,10 +534,10 @@ Update an existing pet
===== Samples
// markup not found, no include ::pet/PUT/http-request.adoc[]
// markup not found, no include ::pet/PUT/http-request.adoc[opts=optional]
// markup not found, no include ::pet/PUT/http-response.adoc[]
// markup not found, no include ::pet/PUT/http-response.adoc[opts=optional]
@ -547,7 +547,7 @@ Update an existing pet
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/PUT/implementation.adoc[]
// markup not found, no include ::pet/PUT/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -565,7 +565,7 @@ Updates a pet in the store with form data
// markup not found, no include ::pet/{petId}/POST/spec.adoc[]
// markup not found, no include ::pet/{petId}/POST/spec.adoc[opts=optional]
@ -613,10 +613,10 @@ Updates a pet in the store with form data
===== Samples
// markup not found, no include ::pet/{petId}/POST/http-request.adoc[]
// markup not found, no include ::pet/{petId}/POST/http-request.adoc[opts=optional]
// markup not found, no include ::pet/{petId}/POST/http-response.adoc[]
// markup not found, no include ::pet/{petId}/POST/http-response.adoc[opts=optional]
@ -626,7 +626,7 @@ Updates a pet in the store with form data
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/{petId}/POST/implementation.adoc[]
// markup not found, no include ::pet/{petId}/POST/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -644,7 +644,7 @@ uploads an image
// markup not found, no include ::pet/{petId}/uploadImage/POST/spec.adoc[]
// markup not found, no include ::pet/{petId}/uploadImage/POST/spec.adoc[opts=optional]
@ -694,10 +694,10 @@ uploads an image
===== Samples
// markup not found, no include ::pet/{petId}/uploadImage/POST/http-request.adoc[]
// markup not found, no include ::pet/{petId}/uploadImage/POST/http-request.adoc[opts=optional]
// markup not found, no include ::pet/{petId}/uploadImage/POST/http-response.adoc[]
// markup not found, no include ::pet/{petId}/uploadImage/POST/http-response.adoc[opts=optional]
@ -707,7 +707,7 @@ uploads an image
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::pet/{petId}/uploadImage/POST/implementation.adoc[]
// markup not found, no include ::pet/{petId}/uploadImage/POST/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -729,7 +729,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[]
// markup not found, no include ::store/order/{orderId}/DELETE/spec.adoc[opts=optional]
@ -782,10 +782,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[]
// markup not found, no include ::store/order/{orderId}/DELETE/http-request.adoc[opts=optional]
// markup not found, no include ::store/order/{orderId}/DELETE/http-response.adoc[]
// markup not found, no include ::store/order/{orderId}/DELETE/http-response.adoc[opts=optional]
@ -795,7 +795,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[]
// markup not found, no include ::store/order/{orderId}/DELETE/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -813,7 +813,7 @@ Returns pet inventories by status
Returns a map of status codes to quantities
// markup not found, no include ::store/inventory/GET/spec.adoc[]
// markup not found, no include ::store/inventory/GET/spec.adoc[opts=optional]
@ -851,10 +851,10 @@ Returns a map of status codes to quantities
===== Samples
// markup not found, no include ::store/inventory/GET/http-request.adoc[]
// markup not found, no include ::store/inventory/GET/http-request.adoc[opts=optional]
// markup not found, no include ::store/inventory/GET/http-response.adoc[]
// markup not found, no include ::store/inventory/GET/http-response.adoc[opts=optional]
@ -864,7 +864,7 @@ Returns a map of status codes to quantities
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::store/inventory/GET/implementation.adoc[]
// markup not found, no include ::store/inventory/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -882,7 +882,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[]
// markup not found, no include ::store/order/{orderId}/GET/spec.adoc[opts=optional]
@ -943,10 +943,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[]
// markup not found, no include ::store/order/{orderId}/GET/http-request.adoc[opts=optional]
// markup not found, no include ::store/order/{orderId}/GET/http-response.adoc[]
// markup not found, no include ::store/order/{orderId}/GET/http-response.adoc[opts=optional]
@ -956,7 +956,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[]
// markup not found, no include ::store/order/{orderId}/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -974,7 +974,7 @@ Place an order for a pet
// markup not found, no include ::store/order/POST/spec.adoc[]
// markup not found, no include ::store/order/POST/spec.adoc[opts=optional]
@ -1030,10 +1030,10 @@ Place an order for a pet
===== Samples
// markup not found, no include ::store/order/POST/http-request.adoc[]
// markup not found, no include ::store/order/POST/http-request.adoc[opts=optional]
// markup not found, no include ::store/order/POST/http-response.adoc[]
// markup not found, no include ::store/order/POST/http-response.adoc[opts=optional]
@ -1043,7 +1043,7 @@ Place an order for a pet
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::store/order/POST/implementation.adoc[]
// markup not found, no include ::store/order/POST/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1065,7 +1065,7 @@ Create user
This can only be done by the logged in user.
// markup not found, no include ::user/POST/spec.adoc[]
// markup not found, no include ::user/POST/spec.adoc[opts=optional]
@ -1113,10 +1113,10 @@ This can only be done by the logged in user.
===== Samples
// markup not found, no include ::user/POST/http-request.adoc[]
// markup not found, no include ::user/POST/http-request.adoc[opts=optional]
// markup not found, no include ::user/POST/http-response.adoc[]
// markup not found, no include ::user/POST/http-response.adoc[opts=optional]
@ -1126,7 +1126,7 @@ This can only be done by the logged in user.
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::user/POST/implementation.adoc[]
// markup not found, no include ::user/POST/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1144,7 +1144,7 @@ Creates list of users with given input array
// markup not found, no include ::user/createWithArray/POST/spec.adoc[]
// markup not found, no include ::user/createWithArray/POST/spec.adoc[opts=optional]
@ -1192,10 +1192,10 @@ Creates list of users with given input array
===== Samples
// markup not found, no include ::user/createWithArray/POST/http-request.adoc[]
// markup not found, no include ::user/createWithArray/POST/http-request.adoc[opts=optional]
// markup not found, no include ::user/createWithArray/POST/http-response.adoc[]
// markup not found, no include ::user/createWithArray/POST/http-response.adoc[opts=optional]
@ -1205,7 +1205,7 @@ Creates list of users with given input array
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::user/createWithArray/POST/implementation.adoc[]
// markup not found, no include ::user/createWithArray/POST/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1223,7 +1223,7 @@ Creates list of users with given input array
// markup not found, no include ::user/createWithList/POST/spec.adoc[]
// markup not found, no include ::user/createWithList/POST/spec.adoc[opts=optional]
@ -1271,10 +1271,10 @@ Creates list of users with given input array
===== Samples
// markup not found, no include ::user/createWithList/POST/http-request.adoc[]
// markup not found, no include ::user/createWithList/POST/http-request.adoc[opts=optional]
// markup not found, no include ::user/createWithList/POST/http-response.adoc[]
// markup not found, no include ::user/createWithList/POST/http-response.adoc[opts=optional]
@ -1284,7 +1284,7 @@ Creates list of users with given input array
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::user/createWithList/POST/implementation.adoc[]
// markup not found, no include ::user/createWithList/POST/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1302,7 +1302,7 @@ Delete user
This can only be done by the logged in user.
// markup not found, no include ::user/{username}/DELETE/spec.adoc[]
// markup not found, no include ::user/{username}/DELETE/spec.adoc[opts=optional]
@ -1355,10 +1355,10 @@ This can only be done by the logged in user.
===== Samples
// markup not found, no include ::user/{username}/DELETE/http-request.adoc[]
// markup not found, no include ::user/{username}/DELETE/http-request.adoc[opts=optional]
// markup not found, no include ::user/{username}/DELETE/http-response.adoc[]
// markup not found, no include ::user/{username}/DELETE/http-response.adoc[opts=optional]
@ -1368,7 +1368,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[]
// markup not found, no include ::user/{username}/DELETE/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1386,7 +1386,7 @@ Get user by user name
// markup not found, no include ::user/{username}/GET/spec.adoc[]
// markup not found, no include ::user/{username}/GET/spec.adoc[opts=optional]
@ -1447,10 +1447,10 @@ Get user by user name
===== Samples
// markup not found, no include ::user/{username}/GET/http-request.adoc[]
// markup not found, no include ::user/{username}/GET/http-request.adoc[opts=optional]
// markup not found, no include ::user/{username}/GET/http-response.adoc[]
// markup not found, no include ::user/{username}/GET/http-response.adoc[opts=optional]
@ -1460,7 +1460,7 @@ Get user by user name
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::user/{username}/GET/implementation.adoc[]
// markup not found, no include ::user/{username}/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1478,7 +1478,7 @@ Logs user into the system
// markup not found, no include ::user/login/GET/spec.adoc[]
// markup not found, no include ::user/login/GET/spec.adoc[opts=optional]
@ -1541,10 +1541,10 @@ Logs user into the system
===== Samples
// markup not found, no include ::user/login/GET/http-request.adoc[]
// markup not found, no include ::user/login/GET/http-request.adoc[opts=optional]
// markup not found, no include ::user/login/GET/http-response.adoc[]
// markup not found, no include ::user/login/GET/http-response.adoc[opts=optional]
@ -1554,7 +1554,7 @@ Logs user into the system
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::user/login/GET/implementation.adoc[]
// markup not found, no include ::user/login/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1572,7 +1572,7 @@ Logs out current logged in user session
// markup not found, no include ::user/logout/GET/spec.adoc[]
// markup not found, no include ::user/logout/GET/spec.adoc[opts=optional]
@ -1607,10 +1607,10 @@ Logs out current logged in user session
===== Samples
// markup not found, no include ::user/logout/GET/http-request.adoc[]
// markup not found, no include ::user/logout/GET/http-request.adoc[opts=optional]
// markup not found, no include ::user/logout/GET/http-response.adoc[]
// markup not found, no include ::user/logout/GET/http-response.adoc[opts=optional]
@ -1620,7 +1620,7 @@ Logs out current logged in user session
ifdef::internal-generation[]
===== Implementation
// markup not found, no include ::user/logout/GET/implementation.adoc[]
// markup not found, no include ::user/logout/GET/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1638,7 +1638,7 @@ Updated user
This can only be done by the logged in user.
// markup not found, no include ::user/{username}/PUT/spec.adoc[]
// markup not found, no include ::user/{username}/PUT/spec.adoc[opts=optional]
@ -1704,10 +1704,10 @@ This can only be done by the logged in user.
===== Samples
// markup not found, no include ::user/{username}/PUT/http-request.adoc[]
// markup not found, no include ::user/{username}/PUT/http-request.adoc[opts=optional]
// markup not found, no include ::user/{username}/PUT/http-response.adoc[]
// markup not found, no include ::user/{username}/PUT/http-response.adoc[opts=optional]
@ -1717,7 +1717,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[]
// markup not found, no include ::user/{username}/PUT/implementation.adoc[opts=optional]
endif::internal-generation[]
@ -1728,7 +1728,7 @@ endif::internal-generation[]
[#ApiResponse]
==== _ApiResponse_ An uploaded response
=== _ApiResponse_ An uploaded response
Describes the result of uploading an image resource
@ -1741,25 +1741,25 @@ Describes the result of uploading an image resource
|
| Integer
|
| int32 _
| int32
| type
|
| String
|
| _
|
| message
|
| String
|
| _
|
|===
[#Category]
==== _Category_ Pet category
=== _Category_ Pet category
A category for a pet
@ -1772,19 +1772,19 @@ A category for a pet
|
| Long
|
| int64 _
| int64
| name
|
| String
|
| _
|
|===
[#Order]
==== _Order_ Pet Order
=== _Order_ Pet Order
An order for a pets from the pet store
@ -1797,43 +1797,43 @@ An order for a pets from the pet store
|
| Long
|
| int64 _
| int64
| petId
|
| Long
|
| int64 _
| int64
| quantity
|
| Integer
|
| int32 _
| int32
| shipDate
|
| Date
|
| date-time _
| date-time
| status
|
| String
| Order Status
| Enum: _ placed, approved, delivered, _
| _Enum:_ placed, approved, delivered,
| complete
|
| Boolean
|
| _
|
|===
[#Pet]
==== _Pet_ a Pet
=== _Pet_ a Pet
A pet for sale in the pet store
@ -1846,43 +1846,43 @@ A pet for sale in the pet store
|
| Long
|
| int64 _
| int64
| category
|
| Category
|
| _
|
| name
| X
| String
|
| _
|
| photoUrls
| X
| List of <<string>>
|
| _
|
| tags
|
| List of <<Tag>>
|
| _
|
| status
|
| String
| pet status in the store
| Enum: _ available, pending, sold, _
| _Enum:_ available, pending, sold,
|===
[#Tag]
==== _Tag_ Pet Tag
=== _Tag_ Pet Tag
A tag for a pet
@ -1895,19 +1895,19 @@ A tag for a pet
|
| Long
|
| int64 _
| int64
| name
|
| String
|
| _
|
|===
[#User]
==== _User_ a User
=== _User_ a User
A User who is purchasing from the pet store
@ -1920,49 +1920,49 @@ A User who is purchasing from the pet store
|
| Long
|
| int64 _
| int64
| username
|
| String
|
| _
|
| firstName
|
| String
|
| _
|
| lastName
|
| String
|
| _
|
| email
|
| String
|
| _
|
| password
|
| String
|
| _
|
| phone
|
| String
|
| _
|
| userStatus
|
| Integer
| User Status
| int32 _
| int32
|===