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 5e8e788209a..23fa88fb05e 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 @@ -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"); diff --git a/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache b/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache index 425cb563715..99cd8d8f664 100644 --- a/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache +++ b/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache @@ -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}} diff --git a/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache b/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache index b36b7227c19..c5f93d6afdb 100644 --- a/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache +++ b/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache @@ -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}} |=== diff --git a/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache b/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache index 863c7294891..563e7976fdf 100644 --- a/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache +++ b/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache @@ -1,4 +1,4 @@ -| {{paramName}} +| {{baseName}} | {{description}} {{#baseType}}<<{{baseType}}>>{{/baseType}} | {{^required}}-{{/required}}{{#required}}X{{/required}} | {{defaultValue}} 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 930cab9ded2..d12d2b6f75a 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 @@ -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 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."); } } 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 7c178b49550..0419969ef4f 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 @@ -26,7 +26,7 @@ public class IncludeMarkupFilterTest extends LambdaTest { 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[]"), + Assert.assertTrue(result.contains("// markup not found, no include ::not.an.existing.file.adoc["), "unexpected filtered " + result); } diff --git a/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json b/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json index 9a19658cc2c..4f1c22adf5d 100644 --- a/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json +++ b/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json @@ -1 +1,1416 @@ -{"openapi":"3.0.1","info":{"title":"time@work rest api","description":"internal rest api, used by time@work angular client","contact":{"name":"man@home","url":"https://gitlab.com/spare-time-demos/timeatwork","email":"man.at.home@do-not-use-this-mail.com"},"license":{"name":"Apache 2.0","url":"http://foo.bar"},"version":"0.1"},"externalDocs":{"description":"specs","url":"https://gitlab.com/spare-time-demos/timeatwork/tree/master/docs/src/main/docs/features"},"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"tags":[{"name":"ui-admin","description":"ui: admin and team lead api calls"},{"name":"ui-user","description":"ui: user api calls"},{"name":"admin","description":"admin api, internal use"},{"name":"graphql","description":"external graphql api (spike only)"}],"paths":{"/rest/admin/job/usersync":{"get":{"tags":["admin"],"summary":"start background job: usersync","operationId":"startuserSync","responses":{"200":{"description":"default response","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/rest/project":{"get":{"tags":["ui-admin"],"summary":"retrieving all visible projects for current user.","operationId":"getProjects","responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}}}},"post":{"tags":["ui-admin"],"summary":"create a new project.","operationId":"createProject","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}}}}},"/rest/project/{projectId}":{"get":{"tags":["ui-admin"],"summary":"retrieving a specific visible projects for current user.","operationId":"getProject","parameters":[{"name":"projectId","in":"path","description":"unique project id to find","required":true,"schema":{"type":"integer","format":"int64"},"example":"0185"}],"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}}}},"put":{"tags":["ui-admin"],"summary":"change an existing project.","operationId":"changeProject","parameters":[{"name":"projectId","in":"path","description":"unique project id to change","required":true,"schema":{"type":"integer","format":"int64"},"example":"0815"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}}}}},"/rest/project/{projectId}/task":{"get":{"tags":["ui-admin"],"summary":"retrieving tasks for a specific project.","operationId":"getProjectTasks","parameters":[{"name":"projectId","in":"path","description":"project id to find tasks for","required":true,"schema":{"type":"integer","format":"int64"},"example":"0815"}],"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Task"}}}}}}},"post":{"tags":["ui-admin"],"summary":"create a new task for an existing project","operationId":"createTaskForProject","parameters":[{"name":"projectId","in":"path","description":"project id for task to change","required":true,"schema":{"type":"integer","format":"int64"},"example":"0815"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"responses":{"200":{"description":"task created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"404":{"description":"project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStatusException"}}}}}}},"/rest/task/{taskId}":{"get":{"tags":["ui-admin"],"summary":"retrieving a specific task.","operationId":"getTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Task"}}}}}},"put":{"tags":["ui-admin"],"summary":"change an existing task.","operationId":"changeTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}}}},"delete":{"tags":["ui-admin"],"summary":"delete an existing task.","operationId":"deleteTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"default response","content":{"*/*":{"schema":{"type":"integer","format":"int64"}}}}}}},"/rest/task/{taskId}/assignment":{"get":{"tags":["ui-admin"],"summary":"retrieving team member assignments for a specific task.","operationId":"getTaskAssignments","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"default response","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskAssignment"}}}}}}},"post":{"tags":["ui-admin"],"summary":"add a new assignment to an existing task.","operationId":"createAssignment","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAssignment"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAssignment"}}}}}}},"/rest/task/{taskId}/assignment/{id}":{"put":{"tags":["ui-admin"],"summary":"change from/until of given assignment","operationId":"changeAssignment","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAssignment"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAssignment"}}}}}}},"/rest/task/{taskId}/assignment/{assignmentId}":{"delete":{"tags":["ui-admin"],"summary":"delete an existing assignment from task.","operationId":"deleteAssignment","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"assignmentId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"default response","content":{"*/*":{"schema":{"type":"integer","format":"int64"}}}}}}},"/rest/teammember":{"get":{"tags":["ui-admin","ui-user"],"summary":"retrieving all known users.","operationId":"getTeamMembers","responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"}}}}}}}},"/rest/workweek/{fromIsoDateString}":{"get":{"tags":["ui-user"],"summary":"retrieving work week for given week, date format: /rest/workweek/YYYY-MM-DD.","operationId":"getWorkWeek","parameters":[{"name":"fromIsoDateString","in":"path","description":"date, start of week, format YYYY-MM-DD","required":true,"schema":{"type":"string"},"example":"2019-03-11"}],"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkWeek"}}}}}},"put":{"tags":["ui-user"],"summary":"update work done for given week","operationId":"updateWorkWeek","parameters":[{"name":"fromIsoDateString","in":"path","description":"date, start of week, format YYYY-MM-DD","required":true,"schema":{"type":"string"},"example":"2019-03-11"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkWeek"}}}},"responses":{"200":{"description":"default response"}}}},"/graphql":{"get":{"operationId":"graphqlGET","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string"}},{"name":"operationName","in":"query","required":false,"schema":{"type":"string"}},{"name":"variables","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"default response","content":{"*/*":{"schema":{"type":"object"}}}}}},"post":{"operationId":"graphqlPOST","requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/GraphQLRequestBody"}}}},"responses":{"200":{"description":"default response","content":{"*/*":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"Project":{"required":["active","name"],"type":"object","properties":{"id":{"type":"integer","description":"unique project id.","format":"int64","example":815},"name":{"maxLength":100,"minLength":1,"type":"string","description":"unique descriptive name","example":"my unique project name"},"active":{"type":"boolean","description":"is project active for administration by project lead.","example":true},"projectLeads":{"type":"array","description":"project leads (administrator)","items":{"$ref":"#/components/schemas/TeamMember"}}},"description":"tracked project."},"TeamMember":{"required":["name","userId"],"type":"object","properties":{"id":{"type":"integer","description":"unique internal member id","format":"int64","example":4712},"name":{"maxLength":100,"type":"string","description":"unique descriptive name","example":"Tom Teammember"},"userId":{"maxLength":100,"type":"string","description":"unique descriptive name","example":"tlead1"}},"description":"a team member, could be project lead or an member with assigned tasks."},"Task":{"required":["name","project","state"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"maxLength":100,"minLength":1,"type":"string","description":"unique descriptive name","example":"first task: do something"},"state":{"type":"string","enum":["planned","active","done"]},"project":{"$ref":"#/components/schemas/Project"}},"description":"a project task to be worked on."},"ResponseStatusException":{"type":"object","properties":{"mostSpecificCause":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"suppressed":{"type":"array","items":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"localizedMessage":{"type":"string"}}}},"localizedMessage":{"type":"string"}}},"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"status":{"type":"string","enum":["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]},"reason":{"type":"string"},"message":{"type":"string"},"rootCause":{"type":"object","properties":{"cause":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"suppressed":{"type":"array","items":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"localizedMessage":{"type":"string"}}}},"localizedMessage":{"type":"string"}}},"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"suppressed":{"type":"array","items":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"localizedMessage":{"type":"string"}}}},"localizedMessage":{"type":"string"}}},"suppressed":{"type":"array","items":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"localizedMessage":{"type":"string"}}}},"localizedMessage":{"type":"string"}}},"TaskAssignment":{"required":["from","teamMember"],"type":"object","properties":{"id":{"type":"integer","description":"internal unique assignment id","format":"int64","example":-1},"teamMember":{"$ref":"#/components/schemas/TeamMember"},"from":{"type":"string","description":"assignment start date","format":"date"},"until":{"type":"string","description":"optional assignment end date","format":"date"}},"description":"planned assignment of a team member to a given project task."},"TaskWeek":{"type":"object","properties":{"taskId":{"type":"integer","format":"int64"},"taskName":{"type":"string"},"workHours":{"type":"array","items":{"$ref":"#/components/schemas/WorkHoursAssigned"}}},"description":"one week of working hours for a given task."},"WorkHoursAssigned":{"type":"object","properties":{"workHours":{"type":"integer","format":"int64"},"readOnly":{"type":"boolean"}}},"WorkWeek":{"type":"object","properties":{"from":{"type":"string","format":"date"},"until":{"type":"string","format":"date"},"taskWeeks":{"type":"array","items":{"$ref":"#/components/schemas/TaskWeek"}}},"description":"week, holds all work and working assignments."},"GraphQLRequestBody":{"type":"object","properties":{"query":{"type":"string"},"operationName":{"type":"string"},"variables":{"type":"object","additionalProperties":{"type":"object"}}}}},"securitySchemes":{"APIKEY_IN_HEADER":{"type":"apiKey","description":"authentication with APIKEY http header not yet implemented","name":"APIKEY","in":"header"}}}} \ No newline at end of file +{ + "openapi": "3.0.1", + "info": { + "title": "time@work rest api", + "description": "internal rest api, used by time@work angular client", + "contact": { + "name": "man@home", + "url": "https://gitlab.com/spare-time-demos/timeatwork", + "email": "man.at.home@do-not-use-this-mail.com" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.txt" + }, + "version": "0.1" + }, + "externalDocs": { + "description": "specs", + "url": "https://gitlab.com/spare-time-demos/timeatwork/tree/master/docs/src/main/docs/features" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "ui-admin", + "description": "ui: admin and team lead api calls" + }, + { + "name": "ui-user", + "description": "ui: user api calls" + }, + { + "name": "security", + "description": "login" + }, + { + "name": "admin", + "description": "admin api, internal use" + } + ], + "paths": { + "/rest/admin/info": { + "get": { + "tags": [ + "admin" + ], + "summary": "(dummy) application info endpoint.", + "operationId": "info", + "responses": { + "200": { + "description": "default response", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/rest/admin/job/usersync": { + "get": { + "tags": [ + "admin" + ], + "summary": "start background job: usersync", + "operationId": "startuserSync", + "responses": { + "200": { + "description": "default response", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/authentication": { + "post": { + "tags": [ + "security" + ], + "summary": "login with username and password, getting an jwt token on successful.", + "operationId": "login", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/AuthenticationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "default response", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + } + } + } + } + } + }, + "/rest/project/": { + "get": { + "tags": [ + "ui-admin" + ], + "summary": "retrieving all visible projects for current user.", + "operationId": "getProjects", + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CProject" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "ui-admin" + ], + "summary": "create a new project.", + "operationId": "createProject", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CProject" + } + } + } + }, + "responses": { + "201": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CProject" + } + } + } + } + } + } + }, + "/rest/project/{projectId}": { + "get": { + "tags": [ + "ui-admin" + ], + "summary": "retrieving a specific visible projects for current user.", + "operationId": "getProject", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "unique project id to find", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "example": "0185" + } + ], + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CProject" + } + } + } + } + } + }, + "put": { + "tags": [ + "ui-admin" + ], + "summary": "change an existing project.", + "operationId": "changeProject", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "unique project id to change", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "example": "0815" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CProject" + } + } + } + }, + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CProject" + } + } + } + } + } + } + }, + "/rest/project/{projectId}/task": { + "get": { + "tags": [ + "ui-admin" + ], + "summary": "retrieving tasks for a specific project.", + "operationId": "getProjectTasks", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "project id to find tasks for", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "example": "0815" + } + ], + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CTask" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "ui-admin" + ], + "summary": "create a new task for an existing project", + "operationId": "createTaskForProject", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "project id for task to change", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "example": "0815" + } + ], + "requestBody": { + "description": "new task data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTask" + } + } + }, + "required": false + }, + "responses": { + "201": { + "description": "task created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTask" + } + } + } + }, + "403": { + "description": "not authorized as project lead or admin", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTask" + } + } + } + }, + "404": { + "description": "project not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseStatusException" + } + } + } + } + } + } + }, + "/rest/task/{taskId}/assignment": { + "get": { + "tags": [ + "ui-admin" + ], + "summary": "retrieving team member assignments for a specific task.", + "operationId": "getTaskAssignments", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CTaskAssignment" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "ui-admin" + ], + "summary": "add a new assignment to an existing task.", + "operationId": "createAssignment", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTaskAssignment" + } + } + } + }, + "responses": { + "201": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTaskAssignment" + } + } + } + } + } + } + }, + "/rest/task/{taskId}": { + "get": { + "tags": [ + "ui-admin" + ], + "summary": "retrieving a specific task.", + "operationId": "getTask", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "default response", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CTask" + } + } + } + } + } + }, + "put": { + "tags": [ + "ui-admin" + ], + "summary": "change an existing task.", + "operationId": "changeTask", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTask" + } + } + } + }, + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + } + } + } + }, + "delete": { + "tags": [ + "ui-admin" + ], + "summary": "delete an existing task.", + "operationId": "deleteTask", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + }, + "/rest/task/{taskId}/assignment/{assignmentId}": { + "put": { + "tags": [ + "ui-admin" + ], + "summary": "change from/until of given assignment", + "operationId": "changeAssignment", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "assignmentId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTaskAssignment" + } + } + } + }, + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CTaskAssignment" + } + } + } + } + } + }, + "delete": { + "tags": [ + "ui-admin" + ], + "summary": "delete an existing assignment from task", + "operationId": "deleteAssignment", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "assignmentId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "default response", + "content": { + "*/*": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + }, + "/rest/teammember": { + "get": { + "tags": [ + "ui-admin", + "ui-user" + ], + "summary": "retrieving all known users.", + "operationId": "getTeamMembers", + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CTeamMember" + } + } + } + } + } + } + } + }, + "/rest/workweek/{from-iso-date-string}": { + "get": { + "tags": [ + "ui-user" + ], + "summary": "retrieving work week for given week, date format: /rest/workweek/YYYY-MM-DD.", + "operationId": "getWorkWeek", + "parameters": [ + { + "name": "from-iso-date-string", + "in": "path", + "description": "date, start of week, format YYYY-MM-DD", + "required": true, + "schema": { + "type": "string" + }, + "example": "2019-03-11" + } + ], + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkWeek" + } + } + } + } + } + }, + "put": { + "tags": [ + "ui-user" + ], + "summary": "update work done for given week", + "operationId": "updateWorkWeek", + "parameters": [ + { + "name": "from-iso-date-string", + "in": "path", + "description": "date, start of week, format YYYY-MM-DD", + "required": true, + "schema": { + "type": "string" + }, + "example": "2019-03-11" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkWeek" + } + } + } + }, + "responses": { + "200": { + "description": "default response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AuthenticationRequest": { + "type": "object", + "properties": { + "userName": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "AuthenticationResult": { + "type": "object", + "properties": { + "ok": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "CProject": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "projectLeads": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CTeamMember" + } + } + } + }, + "CTeamMember": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "userId": { + "type": "string" + } + } + }, + "CTask": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "ResponseStatusException": { + "type": "object", + "properties": { + "mostSpecificCause": { + "type": "object", + "properties": { + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "message": { + "type": "string" + }, + "suppressed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "message": { + "type": "string" + }, + "localizedMessage": { + "type": "string" + } + } + } + }, + "localizedMessage": { + "type": "string" + } + } + }, + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "100 CONTINUE", + "101 SWITCHING_PROTOCOLS", + "102 PROCESSING", + "103 CHECKPOINT", + "200 OK", + "201 CREATED", + "202 ACCEPTED", + "203 NON_AUTHORITATIVE_INFORMATION", + "204 NO_CONTENT", + "205 RESET_CONTENT", + "206 PARTIAL_CONTENT", + "207 MULTI_STATUS", + "208 ALREADY_REPORTED", + "226 IM_USED", + "300 MULTIPLE_CHOICES", + "301 MOVED_PERMANENTLY", + "302 FOUND", + "302 MOVED_TEMPORARILY", + "303 SEE_OTHER", + "304 NOT_MODIFIED", + "305 USE_PROXY", + "307 TEMPORARY_REDIRECT", + "308 PERMANENT_REDIRECT", + "400 BAD_REQUEST", + "401 UNAUTHORIZED", + "402 PAYMENT_REQUIRED", + "403 FORBIDDEN", + "404 NOT_FOUND", + "405 METHOD_NOT_ALLOWED", + "406 NOT_ACCEPTABLE", + "407 PROXY_AUTHENTICATION_REQUIRED", + "408 REQUEST_TIMEOUT", + "409 CONFLICT", + "410 GONE", + "411 LENGTH_REQUIRED", + "412 PRECONDITION_FAILED", + "413 PAYLOAD_TOO_LARGE", + "413 REQUEST_ENTITY_TOO_LARGE", + "414 URI_TOO_LONG", + "414 REQUEST_URI_TOO_LONG", + "415 UNSUPPORTED_MEDIA_TYPE", + "416 REQUESTED_RANGE_NOT_SATISFIABLE", + "417 EXPECTATION_FAILED", + "418 I_AM_A_TEAPOT", + "419 INSUFFICIENT_SPACE_ON_RESOURCE", + "420 METHOD_FAILURE", + "421 DESTINATION_LOCKED", + "422 UNPROCESSABLE_ENTITY", + "423 LOCKED", + "424 FAILED_DEPENDENCY", + "425 TOO_EARLY", + "426 UPGRADE_REQUIRED", + "428 PRECONDITION_REQUIRED", + "429 TOO_MANY_REQUESTS", + "431 REQUEST_HEADER_FIELDS_TOO_LARGE", + "451 UNAVAILABLE_FOR_LEGAL_REASONS", + "500 INTERNAL_SERVER_ERROR", + "501 NOT_IMPLEMENTED", + "502 BAD_GATEWAY", + "503 SERVICE_UNAVAILABLE", + "504 GATEWAY_TIMEOUT", + "505 HTTP_VERSION_NOT_SUPPORTED", + "506 VARIANT_ALSO_NEGOTIATES", + "507 INSUFFICIENT_STORAGE", + "508 LOOP_DETECTED", + "509 BANDWIDTH_LIMIT_EXCEEDED", + "510 NOT_EXTENDED", + "511 NETWORK_AUTHENTICATION_REQUIRED" + ] + }, + "reason": { + "type": "string" + }, + "message": { + "type": "string" + }, + "rootCause": { + "type": "object", + "properties": { + "cause": { + "type": "object", + "properties": { + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "message": { + "type": "string" + }, + "suppressed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "message": { + "type": "string" + }, + "localizedMessage": { + "type": "string" + } + } + } + }, + "localizedMessage": { + "type": "string" + } + } + }, + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "message": { + "type": "string" + }, + "suppressed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "message": { + "type": "string" + }, + "localizedMessage": { + "type": "string" + } + } + } + }, + "localizedMessage": { + "type": "string" + } + } + }, + "suppressed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stackTrace": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classLoaderName": { + "type": "string" + }, + "moduleName": { + "type": "string" + }, + "moduleVersion": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "lineNumber": { + "type": "integer", + "format": "int32" + }, + "className": { + "type": "string" + }, + "nativeMethod": { + "type": "boolean" + } + } + } + }, + "message": { + "type": "string" + }, + "localizedMessage": { + "type": "string" + } + } + } + }, + "localizedMessage": { + "type": "string" + } + } + }, + "CTaskAssignment": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "task": { + "$ref": "#/components/schemas/CTask" + }, + "teamMember": { + "$ref": "#/components/schemas/CTeamMember" + }, + "from": { + "type": "string", + "format": "date" + }, + "until": { + "type": "string", + "format": "date" + } + } + }, + "Project": { + "required": [ + "active", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "unique project id.", + "format": "int64", + "example": 815 + }, + "name": { + "maxLength": 100, + "minLength": 1, + "type": "string", + "description": "unique descriptive name", + "example": "my unique project name" + }, + "active": { + "type": "boolean", + "description": "is project active for administration by project lead.", + "example": true + }, + "projectLeads": { + "type": "array", + "description": "project leads (administrator)", + "items": { + "$ref": "#/components/schemas/TeamMember" + } + } + }, + "description": "tracked project." + }, + "Task": { + "required": [ + "name", + "project", + "state" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "maxLength": 100, + "minLength": 1, + "type": "string", + "description": "unique descriptive name", + "example": "first task: do something" + }, + "state": { + "type": "string", + "enum": [ + "PLANNED", + "ACTIVE", + "DONE" + ] + }, + "project": { + "$ref": "#/components/schemas/Project" + } + }, + "description": "a project task to be worked on." + }, + "TeamMember": { + "required": [ + "name", + "userId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "unique internal member id", + "format": "int64", + "example": 4712 + }, + "name": { + "maxLength": 100, + "type": "string", + "description": "unique descriptive name", + "example": "Tom Teammember" + }, + "userId": { + "maxLength": 100, + "type": "string", + "description": "unique descriptive name", + "example": "tlead1" + } + }, + "description": "a team member, could be project lead or an member with assigned tasks." + }, + "TaskWeek": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "task unique id", + "format": "int64" + }, + "taskName": { + "type": "string" + }, + "workHours": { + "type": "array", + "description": "7 days array of working hours", + "items": { + "$ref": "#/components/schemas/WorkHoursAssigned" + } + } + }, + "description": "one week of working hours for a given task." + }, + "WorkHoursAssigned": { + "type": "object", + "properties": { + "workHours": { + "type": "integer", + "description": "working hours done for given task on this day", + "format": "int32" + }, + "readOnly": { + "type": "boolean", + "description": "current user is able to change values for this day and task." + } + }, + "description": "7 days array of working hours" + }, + "WorkWeek": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "start of week", + "format": "date", + "example": "2019-01-02" + }, + "until": { + "type": "string", + "description": "last day of week", + "format": "date", + "example": "2019-01-08" + }, + "taskWeeks": { + "type": "array", + "description": "list of tasks for this week", + "items": { + "$ref": "#/components/schemas/TaskWeek" + } + } + }, + "description": "week, holds all work and working assignments." + } + }, + "securitySchemes": { + "Authentication": { + "type": "apiKey", + "description": "auth with jwt bearer token in 'Authentication' header of proctected requests.", + "name": "Authentication", + "in": "header" + } + } + } +} diff --git a/samples/documentation/asciidoc/.openapi-generator/VERSION b/samples/documentation/asciidoc/.openapi-generator/VERSION index 0e97bd19efb..d168f1d8bda 100644 --- a/samples/documentation/asciidoc/.openapi-generator/VERSION +++ b/samples/documentation/asciidoc/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/documentation/asciidoc/index.adoc b/samples/documentation/asciidoc/index.adoc index 148466dd320..5e174f0842f 100644 --- a/samples/documentation/asciidoc/index.adoc +++ b/samples/documentation/asciidoc/index.adoc @@ -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[<>] ===== 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[<>] 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[<>] ===== 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[<>] 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 <> | -| _ +| | tags | | List of <> | -| _ +| | 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 |===