From a155f0536ed363463e4e76a21848d019a5678153 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Tue, 29 Oct 2019 17:57:31 +0530 Subject: [PATCH 1/4] feat(documentation): Adding model documentation --- .../src/main/resources/python/model_doc.mustache | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/resources/python/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/model_doc.mustache index 71c106fdc55d..a13b6bed1adf 100644 --- a/modules/openapi-generator/src/main/resources/python/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_doc.mustache @@ -1,5 +1,6 @@ {{#models}}{{#model}}# {{classname}} +{{#description}}{{description}}{{/description}} ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- From 3cefe971948d0513581ea9c859885fe470ae795c Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Tue, 29 Oct 2019 17:58:18 +0530 Subject: [PATCH 2/4] feat(documentation): Adding model documentation --- .../src/main/resources/python/model_doc.mustache | 3 ++- samples/client/petstore/python/docs/ClassModel.md | 1 + samples/client/petstore/python/docs/File.md | 1 + samples/client/petstore/python/docs/Model200Response.md | 1 + samples/client/petstore/python/docs/ModelReturn.md | 1 + samples/client/petstore/python/docs/Name.md | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/model_doc.mustache index a13b6bed1adf..c1ead8680c7e 100644 --- a/modules/openapi-generator/src/main/resources/python/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_doc.mustache @@ -1,6 +1,7 @@ {{#models}}{{#model}}# {{classname}} -{{#description}}{{description}}{{/description}} +{{#description}}{{description}} +{{/description}} ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/ClassModel.md b/samples/client/petstore/python/docs/ClassModel.md index 7f6f6d172116..733c19fae986 100644 --- a/samples/client/petstore/python/docs/ClassModel.md +++ b/samples/client/petstore/python/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/File.md b/samples/client/petstore/python/docs/File.md index 6a925f0a7af4..5dce05eabb3c 100644 --- a/samples/client/petstore/python/docs/File.md +++ b/samples/client/petstore/python/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/Model200Response.md b/samples/client/petstore/python/docs/Model200Response.md index 30f47cae5210..40d0d7828e14 100644 --- a/samples/client/petstore/python/docs/Model200Response.md +++ b/samples/client/petstore/python/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/ModelReturn.md b/samples/client/petstore/python/docs/ModelReturn.md index 2b03798e3016..65ec73ddae78 100644 --- a/samples/client/petstore/python/docs/ModelReturn.md +++ b/samples/client/petstore/python/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python/docs/Name.md b/samples/client/petstore/python/docs/Name.md index 17dc7a38fe69..807b76afc6ee 100644 --- a/samples/client/petstore/python/docs/Name.md +++ b/samples/client/petstore/python/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- From 30f578237bc1ca91efc56f35f0e23b65f0bb45b6 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Tue, 29 Oct 2019 18:18:10 +0530 Subject: [PATCH 3/4] feat(documentation): Adding model documentation --- .../resources/python/python-experimental/model_doc.mustache | 2 ++ samples/client/petstore/python-asyncio/docs/ClassModel.md | 1 + samples/client/petstore/python-asyncio/docs/File.md | 1 + samples/client/petstore/python-asyncio/docs/Model200Response.md | 1 + samples/client/petstore/python-asyncio/docs/ModelReturn.md | 1 + samples/client/petstore/python-asyncio/docs/Name.md | 1 + samples/client/petstore/python-experimental/docs/ClassModel.md | 1 + samples/client/petstore/python-experimental/docs/File.md | 1 + .../petstore/python-experimental/docs/Model200Response.md | 1 + samples/client/petstore/python-experimental/docs/ModelReturn.md | 1 + samples/client/petstore/python-experimental/docs/Name.md | 1 + .../petstore/python-experimental/docs/TypeHolderDefault.md | 1 + .../petstore/python-experimental/docs/TypeHolderExample.md | 1 + samples/client/petstore/python-tornado/docs/ClassModel.md | 1 + samples/client/petstore/python-tornado/docs/File.md | 1 + samples/client/petstore/python-tornado/docs/Model200Response.md | 1 + samples/client/petstore/python-tornado/docs/ModelReturn.md | 1 + samples/client/petstore/python-tornado/docs/Name.md | 1 + 18 files changed, 19 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache index 16592869b741..e04f7dba5ead 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_doc.mustache @@ -1,5 +1,7 @@ {{#models}}{{#model}}# {{classname}} +{{#description}}{{description}} +{{/description}} ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/ClassModel.md b/samples/client/petstore/python-asyncio/docs/ClassModel.md index 7f6f6d172116..733c19fae986 100644 --- a/samples/client/petstore/python-asyncio/docs/ClassModel.md +++ b/samples/client/petstore/python-asyncio/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/File.md b/samples/client/petstore/python-asyncio/docs/File.md index 6a925f0a7af4..5dce05eabb3c 100644 --- a/samples/client/petstore/python-asyncio/docs/File.md +++ b/samples/client/petstore/python-asyncio/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/Model200Response.md b/samples/client/petstore/python-asyncio/docs/Model200Response.md index 30f47cae5210..40d0d7828e14 100644 --- a/samples/client/petstore/python-asyncio/docs/Model200Response.md +++ b/samples/client/petstore/python-asyncio/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/ModelReturn.md b/samples/client/petstore/python-asyncio/docs/ModelReturn.md index 2b03798e3016..65ec73ddae78 100644 --- a/samples/client/petstore/python-asyncio/docs/ModelReturn.md +++ b/samples/client/petstore/python-asyncio/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-asyncio/docs/Name.md b/samples/client/petstore/python-asyncio/docs/Name.md index 17dc7a38fe69..807b76afc6ee 100644 --- a/samples/client/petstore/python-asyncio/docs/Name.md +++ b/samples/client/petstore/python-asyncio/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/ClassModel.md b/samples/client/petstore/python-experimental/docs/ClassModel.md index 7f6f6d172116..733c19fae986 100644 --- a/samples/client/petstore/python-experimental/docs/ClassModel.md +++ b/samples/client/petstore/python-experimental/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/File.md b/samples/client/petstore/python-experimental/docs/File.md index 6a925f0a7af4..5dce05eabb3c 100644 --- a/samples/client/petstore/python-experimental/docs/File.md +++ b/samples/client/petstore/python-experimental/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/Model200Response.md b/samples/client/petstore/python-experimental/docs/Model200Response.md index 30f47cae5210..40d0d7828e14 100644 --- a/samples/client/petstore/python-experimental/docs/Model200Response.md +++ b/samples/client/petstore/python-experimental/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/ModelReturn.md b/samples/client/petstore/python-experimental/docs/ModelReturn.md index 2b03798e3016..65ec73ddae78 100644 --- a/samples/client/petstore/python-experimental/docs/ModelReturn.md +++ b/samples/client/petstore/python-experimental/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/Name.md b/samples/client/petstore/python-experimental/docs/Name.md index 17dc7a38fe69..807b76afc6ee 100644 --- a/samples/client/petstore/python-experimental/docs/Name.md +++ b/samples/client/petstore/python-experimental/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md b/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md index 7ec864de09df..698829f8b9dc 100644 --- a/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md +++ b/samples/client/petstore/python-experimental/docs/TypeHolderDefault.md @@ -1,5 +1,6 @@ # TypeHolderDefault +a model to test optional properties with server defaults ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-experimental/docs/TypeHolderExample.md b/samples/client/petstore/python-experimental/docs/TypeHolderExample.md index 71f302f8d9ff..713bc42ed99a 100644 --- a/samples/client/petstore/python-experimental/docs/TypeHolderExample.md +++ b/samples/client/petstore/python-experimental/docs/TypeHolderExample.md @@ -1,5 +1,6 @@ # TypeHolderExample +a model to test required properties with an example and length one enum ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/ClassModel.md b/samples/client/petstore/python-tornado/docs/ClassModel.md index 7f6f6d172116..733c19fae986 100644 --- a/samples/client/petstore/python-tornado/docs/ClassModel.md +++ b/samples/client/petstore/python-tornado/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/File.md b/samples/client/petstore/python-tornado/docs/File.md index 6a925f0a7af4..5dce05eabb3c 100644 --- a/samples/client/petstore/python-tornado/docs/File.md +++ b/samples/client/petstore/python-tornado/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/Model200Response.md b/samples/client/petstore/python-tornado/docs/Model200Response.md index 30f47cae5210..40d0d7828e14 100644 --- a/samples/client/petstore/python-tornado/docs/Model200Response.md +++ b/samples/client/petstore/python-tornado/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/ModelReturn.md b/samples/client/petstore/python-tornado/docs/ModelReturn.md index 2b03798e3016..65ec73ddae78 100644 --- a/samples/client/petstore/python-tornado/docs/ModelReturn.md +++ b/samples/client/petstore/python-tornado/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/python-tornado/docs/Name.md b/samples/client/petstore/python-tornado/docs/Name.md index 17dc7a38fe69..807b76afc6ee 100644 --- a/samples/client/petstore/python-tornado/docs/Name.md +++ b/samples/client/petstore/python-tornado/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- From 9a7fdc582d75ac9ff629c57078e6ea3f00bd62c8 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Tue, 29 Oct 2019 20:00:08 +0530 Subject: [PATCH 4/4] feat(documentation): Adding model documentation --- samples/openapi3/client/petstore/python/docs/ClassModel.md | 1 + samples/openapi3/client/petstore/python/docs/File.md | 1 + .../openapi3/client/petstore/python/docs/HealthCheckResult.md | 1 + samples/openapi3/client/petstore/python/docs/Model200Response.md | 1 + samples/openapi3/client/petstore/python/docs/ModelReturn.md | 1 + samples/openapi3/client/petstore/python/docs/Name.md | 1 + 6 files changed, 6 insertions(+) diff --git a/samples/openapi3/client/petstore/python/docs/ClassModel.md b/samples/openapi3/client/petstore/python/docs/ClassModel.md index 7f6f6d172116..733c19fae986 100644 --- a/samples/openapi3/client/petstore/python/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/python/docs/ClassModel.md @@ -1,5 +1,6 @@ # ClassModel +Model for testing model with \"_class\" property ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/python/docs/File.md b/samples/openapi3/client/petstore/python/docs/File.md index 6a925f0a7af4..5dce05eabb3c 100644 --- a/samples/openapi3/client/petstore/python/docs/File.md +++ b/samples/openapi3/client/petstore/python/docs/File.md @@ -1,5 +1,6 @@ # File +Must be named `File` for test. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md index 346889210a3d..7cde5c093292 100644 --- a/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md @@ -1,5 +1,6 @@ # HealthCheckResult +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/python/docs/Model200Response.md b/samples/openapi3/client/petstore/python/docs/Model200Response.md index 30f47cae5210..40d0d7828e14 100644 --- a/samples/openapi3/client/petstore/python/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/python/docs/Model200Response.md @@ -1,5 +1,6 @@ # Model200Response +Model for testing model name starting with number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/python/docs/ModelReturn.md b/samples/openapi3/client/petstore/python/docs/ModelReturn.md index 2b03798e3016..65ec73ddae78 100644 --- a/samples/openapi3/client/petstore/python/docs/ModelReturn.md +++ b/samples/openapi3/client/petstore/python/docs/ModelReturn.md @@ -1,5 +1,6 @@ # ModelReturn +Model for testing reserved words ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/samples/openapi3/client/petstore/python/docs/Name.md b/samples/openapi3/client/petstore/python/docs/Name.md index 17dc7a38fe69..807b76afc6ee 100644 --- a/samples/openapi3/client/petstore/python/docs/Name.md +++ b/samples/openapi3/client/petstore/python/docs/Name.md @@ -1,5 +1,6 @@ # Name +Model for testing model name same as property name ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | -------------