nestia 3.1.0 → 3.1.1-dev.20221016
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +33 -0
- package/.prettierignore +5 -0
- package/.vscode/settings.json +10 -0
- package/demo/encrypted/src/Backend.ts +27 -0
- package/demo/encrypted/src/Configuration.ts +7 -0
- package/demo/encrypted/src/api/HttpError.ts +1 -0
- package/demo/encrypted/src/api/IConnection.ts +1 -0
- package/demo/encrypted/src/api/Primitive.ts +1 -0
- package/demo/encrypted/src/api/__internal/AesPkcs5.ts +1 -0
- package/demo/encrypted/src/api/__internal/Fetcher.ts +1 -0
- package/demo/encrypted/src/api/functional/index.ts +7 -0
- package/demo/encrypted/src/api/functional/sellers/authenticate/index.ts +136 -0
- package/demo/encrypted/src/api/functional/sellers/authenticate/password/index.ts +53 -0
- package/demo/encrypted/src/api/functional/sellers/index.ts +7 -0
- package/demo/encrypted/src/api/index.ts +9 -0
- package/demo/encrypted/src/api/module.ts +10 -0
- package/demo/encrypted/src/api/structures/ISeller.ts +56 -0
- package/demo/encrypted/src/controllers/SellerAuthenticateController.ts +70 -0
- package/demo/encrypted/src/test/features/test_seller_exit.ts +18 -0
- package/demo/encrypted/src/test/features/test_seller_join.ts +19 -0
- package/demo/encrypted/src/test/features/test_seller_login.ts +16 -0
- package/demo/encrypted/src/test/features/test_seller_password_change.ts +18 -0
- package/demo/encrypted/src/test/index.ts +24 -0
- package/demo/encrypted/src/test/internal/DynamicImportIterator.ts +109 -0
- package/demo/encrypted/src/test/internal/StopWatch.ts +15 -0
- package/demo/encrypted/swagger.json +257 -0
- package/demo/encrypted/tsconfig.json +8 -0
- package/demo/generic/nestia.config.ts +10 -0
- package/demo/generic/src/Backend.ts +27 -0
- package/demo/generic/src/Configuration.ts +7 -0
- package/demo/generic/src/api/HttpError.ts +1 -0
- package/demo/generic/src/api/IConnection.ts +1 -0
- package/demo/generic/src/api/Primitive.ts +1 -0
- package/demo/generic/src/api/__internal/AesPkcs5.ts +1 -0
- package/demo/generic/src/api/__internal/Fetcher.ts +1 -0
- package/demo/generic/src/api/functional/consumers/index.ts +7 -0
- package/demo/generic/src/api/functional/consumers/sales/index.ts +8 -0
- package/demo/generic/src/api/functional/consumers/sales/questions/index.ts +136 -0
- package/demo/generic/src/api/functional/consumers/sales/reviews/index.ts +136 -0
- package/demo/generic/src/api/functional/index.ts +7 -0
- package/demo/generic/src/api/index.ts +9 -0
- package/demo/generic/src/api/module.ts +10 -0
- package/demo/generic/src/api/structures/IAttachmentFile.ts +21 -0
- package/demo/generic/src/api/structures/ISaleArticle.ts +79 -0
- package/demo/generic/src/api/structures/ISaleInquiry.ts +34 -0
- package/demo/generic/src/api/structures/ISaleInquiryAnswer.ts +23 -0
- package/demo/generic/src/api/structures/ISaleQuestion.ts +22 -0
- package/demo/generic/src/api/structures/ISaleReview.ts +32 -0
- package/demo/generic/src/controllers/ConsumerSaleQuestionsController.ts +33 -0
- package/demo/generic/src/controllers/ConsumerSaleReviewsController.ts +34 -0
- package/demo/generic/src/controllers/SaleInquiriesController.ts +87 -0
- package/demo/generic/src/test/features/test_question_store.ts +21 -0
- package/demo/generic/src/test/features/test_question_update.ts +42 -0
- package/demo/generic/src/test/features/test_review_store.ts +22 -0
- package/demo/generic/src/test/features/test_review_update.ts +44 -0
- package/demo/generic/src/test/index.ts +24 -0
- package/demo/generic/src/test/internal/DynamicImportIterator.ts +109 -0
- package/demo/generic/src/test/internal/StopWatch.ts +15 -0
- package/demo/generic/swagger.json +736 -0
- package/demo/generic/tsconfig.json +9 -0
- package/demo/multiple-paths/src/Backend.ts +27 -0
- package/demo/multiple-paths/src/Configuration.ts +7 -0
- package/demo/multiple-paths/src/api/HttpError.ts +1 -0
- package/demo/multiple-paths/src/api/IConnection.ts +1 -0
- package/demo/multiple-paths/src/api/Primitive.ts +1 -0
- package/demo/multiple-paths/src/api/__internal/AesPkcs5.ts +1 -0
- package/demo/multiple-paths/src/api/__internal/Fetcher.ts +1 -0
- package/demo/multiple-paths/src/api/functional/consumers/index.ts +7 -0
- package/demo/multiple-paths/src/api/functional/consumers/sales/articles/comments/index.ts +65 -0
- package/demo/multiple-paths/src/api/functional/consumers/sales/articles/index.ts +7 -0
- package/demo/multiple-paths/src/api/functional/consumers/sales/index.ts +7 -0
- package/demo/multiple-paths/src/api/functional/health/alive/index.ts +42 -0
- package/demo/multiple-paths/src/api/functional/health/index.ts +44 -0
- package/demo/multiple-paths/src/api/functional/healthy/alive/index.ts +42 -0
- package/demo/multiple-paths/src/api/functional/healthy/index.ts +44 -0
- package/demo/multiple-paths/src/api/functional/index.ts +10 -0
- package/demo/multiple-paths/src/api/functional/sellers/index.ts +7 -0
- package/demo/multiple-paths/src/api/functional/sellers/sales/articles/comments/index.ts +65 -0
- package/demo/multiple-paths/src/api/functional/sellers/sales/articles/index.ts +7 -0
- package/demo/multiple-paths/src/api/functional/sellers/sales/index.ts +7 -0
- package/demo/multiple-paths/src/api/index.ts +9 -0
- package/demo/multiple-paths/src/api/module.ts +10 -0
- package/demo/multiple-paths/src/api/structures/ISaleArticleComment.ts +93 -0
- package/demo/multiple-paths/src/controllers/HealthController.ts +7 -0
- package/demo/multiple-paths/src/controllers/MultipleController.ts +56 -0
- package/demo/multiple-paths/src/test/features/test_consumer_sale_article_comment_store.ts +21 -0
- package/demo/multiple-paths/src/test/features/test_health_checks.ts +10 -0
- package/demo/multiple-paths/src/test/features/test_seller_sale_article_store.ts +21 -0
- package/demo/multiple-paths/src/test/index.ts +24 -0
- package/demo/multiple-paths/src/test/internal/DynamicImportIterator.ts +109 -0
- package/demo/multiple-paths/src/test/internal/StopWatch.ts +15 -0
- package/demo/multiple-paths/swagger.json +338 -0
- package/demo/multiple-paths/tsconfig.json +3 -0
- package/demo/recursive/src/Backend.ts +27 -0
- package/demo/recursive/src/Configuration.ts +7 -0
- package/demo/recursive/src/api/HttpError.ts +1 -0
- package/demo/recursive/src/api/IConnection.ts +1 -0
- package/demo/recursive/src/api/Primitive.ts +1 -0
- package/demo/recursive/src/api/__internal/AesPkcs5.ts +1 -0
- package/demo/recursive/src/api/__internal/Fetcher.ts +1 -0
- package/demo/recursive/src/api/functional/consumers/index.ts +7 -0
- package/demo/recursive/src/api/functional/consumers/systematic/categories/index.ts +117 -0
- package/demo/recursive/src/api/functional/consumers/systematic/index.ts +7 -0
- package/demo/recursive/src/api/functional/index.ts +7 -0
- package/demo/recursive/src/api/index.ts +9 -0
- package/demo/recursive/src/api/module.ts +10 -0
- package/demo/recursive/src/api/structures/ICategory.ts +49 -0
- package/demo/recursive/src/consumer.categories.controller.ts +59 -0
- package/demo/recursive/src/test/features/test_category_at.ts +11 -0
- package/demo/recursive/src/test/features/test_category_invert.ts +14 -0
- package/demo/recursive/src/test/features/test_category_top.ts +11 -0
- package/demo/recursive/src/test/index.ts +24 -0
- package/demo/recursive/src/test/internal/DynamicImportIterator.ts +109 -0
- package/demo/recursive/src/test/internal/StopWatch.ts +15 -0
- package/demo/recursive/swagger.json +216 -0
- package/demo/recursive/tsconfig.json +3 -0
- package/demo/safe/nestia.config.ts +13 -0
- package/demo/safe/src/Backend.ts +27 -0
- package/demo/safe/src/Configuration.ts +7 -0
- package/demo/safe/src/api/HttpError.ts +1 -0
- package/demo/safe/src/api/IConnection.ts +1 -0
- package/demo/safe/src/api/Primitive.ts +1 -0
- package/demo/safe/src/api/__internal/AesPkcs5.ts +1 -0
- package/demo/safe/src/api/__internal/Fetcher.ts +1 -0
- package/demo/safe/src/api/functional/consumers/index.ts +7 -0
- package/demo/safe/src/api/functional/consumers/sales/articles/comments/index.ts +69 -0
- package/demo/safe/src/api/functional/consumers/sales/articles/index.ts +7 -0
- package/demo/safe/src/api/functional/consumers/sales/index.ts +7 -0
- package/demo/safe/src/api/functional/index.ts +7 -0
- package/demo/safe/src/api/index.ts +9 -0
- package/demo/safe/src/api/module.ts +10 -0
- package/demo/safe/src/api/structures/ISaleArticleComment.ts +93 -0
- package/demo/safe/src/controllers/ConsumerSaleArticleCommentsController.ts +63 -0
- package/demo/safe/src/test/features/test_comment_store.ts +23 -0
- package/demo/safe/src/test/index.ts +24 -0
- package/demo/safe/src/test/internal/DynamicImportIterator.ts +109 -0
- package/demo/safe/src/test/internal/StopWatch.ts +15 -0
- package/demo/safe/swagger.json +217 -0
- package/demo/safe/tsconfig.json +3 -0
- package/demo/tsconfig.base.json +70 -0
- package/demo/union/nestia.config.ts +9 -0
- package/demo/union/src/Backend.ts +27 -0
- package/demo/union/src/Configuration.ts +7 -0
- package/demo/union/src/api/HttpError.ts +1 -0
- package/demo/union/src/api/IConnection.ts +1 -0
- package/demo/union/src/api/Primitive.ts +1 -0
- package/demo/union/src/api/__internal/AesPkcs5.ts +1 -0
- package/demo/union/src/api/__internal/Fetcher.ts +1 -0
- package/demo/union/src/api/functional/consumers/index.ts +7 -0
- package/demo/union/src/api/functional/consumers/sales/entire_articles/index.ts +121 -0
- package/demo/union/src/api/functional/consumers/sales/index.ts +9 -0
- package/demo/union/src/api/functional/consumers/sales/questions/index.ts +57 -0
- package/demo/union/src/api/functional/consumers/sales/reviews/index.ts +54 -0
- package/demo/union/src/api/functional/index.ts +7 -0
- package/demo/union/src/api/index.ts +9 -0
- package/demo/union/src/api/module.ts +10 -0
- package/demo/union/src/api/structures/IAttachmentFile.ts +26 -0
- package/demo/union/src/api/structures/IPage.ts +80 -0
- package/demo/union/src/api/structures/ISaleArticle.ts +107 -0
- package/demo/union/src/api/structures/ISaleEntireArticle.ts +22 -0
- package/demo/union/src/api/structures/ISaleInquiry.ts +56 -0
- package/demo/union/src/api/structures/ISaleInquiryAnswer.ts +23 -0
- package/demo/union/src/api/structures/ISaleQuestion.ts +27 -0
- package/demo/union/src/api/structures/ISaleReview.ts +42 -0
- package/demo/union/src/controllers/ConsumerSaleEntireArticlesController.ts +109 -0
- package/demo/union/src/controllers/ConsumerSaleQuestionsController.ts +45 -0
- package/demo/union/src/controllers/ConsumerSaleReviewsController.ts +44 -0
- package/demo/union/src/test/features/test_sale_entire_articles_at.ts +16 -0
- package/demo/union/src/test/features/test_sale_entire_articles_index.ts +27 -0
- package/demo/union/src/test/index.ts +24 -0
- package/demo/union/src/test/internal/DynamicImportIterator.ts +109 -0
- package/demo/union/src/test/internal/StopWatch.ts +15 -0
- package/demo/union/swagger.json +991 -0
- package/demo/union/tsconfig.json +3 -0
- package/lib/test/TestBuilder.d.ts +4 -0
- package/lib/test/TestBuilder.js +60 -0
- package/lib/test/TestBuilder.js.map +1 -0
- package/lib/test/index.d.ts +1 -0
- package/lib/test/index.js +61 -0
- package/lib/test/index.js.map +1 -0
- package/lib/test/test.builder.executor.d.ts +1 -0
- package/lib/test/test.builder.executor.js +24 -0
- package/lib/test/test.builder.executor.js.map +1 -0
- package/package.json +1 -1
- package/prettier.config.js +7 -0
- package/src/IConfiguration.ts +119 -0
- package/src/NestiaApplication.ts +185 -0
- package/src/analyses/ControllerAnalyzer.ts +204 -0
- package/src/analyses/GenericAnalyzer.ts +53 -0
- package/src/analyses/ImportAnalyzer.ts +144 -0
- package/src/analyses/PathAnalyzer.ts +58 -0
- package/src/analyses/ReflectAnalyzer.ts +280 -0
- package/src/analyses/SourceFinder.ts +59 -0
- package/src/executable/internal/CompilerOptions.ts +18 -0
- package/src/executable/internal/NestiaCommand.ts +174 -0
- package/src/executable/internal/NestiaConfig.ts +36 -0
- package/src/executable/internal/NestiaStarter.ts +45 -0
- package/src/executable/internal/nestia.config.getter.ts +11 -0
- package/src/executable/nestia.ts +55 -0
- package/src/generates/FileGenerator.ts +156 -0
- package/src/generates/FunctionGenerator.ts +287 -0
- package/src/generates/SdkGenerator.ts +49 -0
- package/src/generates/SwaggerGenerator.ts +381 -0
- package/src/index.ts +2 -0
- package/src/module.ts +2 -0
- package/src/structures/IController.ts +27 -0
- package/src/structures/IRoute.ts +28 -0
- package/src/structures/ISwagger.ts +55 -0
- package/src/structures/ITypeTuple.ts +6 -0
- package/src/structures/MethodType.ts +11 -0
- package/src/structures/ParamCategory.ts +1 -0
- package/src/structures/TypeEntry.ts +22 -0
- package/src/test/TestBuilder.ts +49 -0
- package/src/test/index.ts +59 -0
- package/src/test/test.builder.executor.ts +11 -0
- package/src/utils/ArrayUtil.ts +26 -0
- package/src/utils/DirectoryUtil.ts +44 -0
- package/src/utils/ImportDictionary.ts +57 -0
- package/src/utils/MapUtil.ts +14 -0
- package/src/utils/StripEnums.ts +10 -0
- package/template/.eslintrc.cjs +22 -0
- package/template/.prettierignore +6 -0
- package/template/prettier.config.js +18 -0
- package/template/tsconfig.json +118 -0
- package/tsconfig.json +82 -0
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.1",
|
|
3
|
+
"servers": [
|
|
4
|
+
{
|
|
5
|
+
"url": "https://github.com/samchon/nestia",
|
|
6
|
+
"description": "insert your server url"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"info": {
|
|
10
|
+
"version": "0.1.0",
|
|
11
|
+
"title": "Generated by nestia - https://github.com/samchon/nestia"
|
|
12
|
+
},
|
|
13
|
+
"paths": {
|
|
14
|
+
"/consumers/{section}/sales/{saleId}/questions": {
|
|
15
|
+
"post": {
|
|
16
|
+
"tags": [],
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"name": "section",
|
|
20
|
+
"in": "path",
|
|
21
|
+
"description": "Code of the target section",
|
|
22
|
+
"schema": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"nullable": false
|
|
25
|
+
},
|
|
26
|
+
"required": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "saleId",
|
|
30
|
+
"in": "path",
|
|
31
|
+
"description": "ID of the target sale",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"nullable": false
|
|
35
|
+
},
|
|
36
|
+
"required": true
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"requestBody": {
|
|
40
|
+
"description": "Content to archive",
|
|
41
|
+
"content": {
|
|
42
|
+
"application/json": {
|
|
43
|
+
"schema": {
|
|
44
|
+
"$ref": "#/components/schemas/ISaleArticle.IStore"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": true
|
|
49
|
+
},
|
|
50
|
+
"responses": {
|
|
51
|
+
"201": {
|
|
52
|
+
"description": "Newly archived inquiry",
|
|
53
|
+
"content": {
|
|
54
|
+
"application/json": {
|
|
55
|
+
"schema": {
|
|
56
|
+
"$ref": "#/components/schemas/ISaleInquiry_lt_ISaleArticle.IContent_gt_"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"400": {
|
|
62
|
+
"description": "bad request error when type of the input data is not valid"
|
|
63
|
+
},
|
|
64
|
+
"401": {
|
|
65
|
+
"description": "unauthorized error when you've not logged in yet"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"description": "Store a new inquiry.\n\nWrite a new article inquirying about a sale."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"/consumers/{section}/sales/{saleId}/questions/{id}": {
|
|
72
|
+
"put": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"parameters": [
|
|
75
|
+
{
|
|
76
|
+
"name": "section",
|
|
77
|
+
"in": "path",
|
|
78
|
+
"description": "Code of the target section",
|
|
79
|
+
"schema": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"nullable": false
|
|
82
|
+
},
|
|
83
|
+
"required": true
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "saleId",
|
|
87
|
+
"in": "path",
|
|
88
|
+
"description": "ID of the target sale",
|
|
89
|
+
"schema": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"nullable": false
|
|
92
|
+
},
|
|
93
|
+
"required": true
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "id",
|
|
97
|
+
"in": "path",
|
|
98
|
+
"description": "ID of the target article to be updated",
|
|
99
|
+
"schema": {
|
|
100
|
+
"type": "number",
|
|
101
|
+
"nullable": false
|
|
102
|
+
},
|
|
103
|
+
"required": true
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"requestBody": {
|
|
107
|
+
"description": "New content to be overwritten",
|
|
108
|
+
"content": {
|
|
109
|
+
"application/json": {
|
|
110
|
+
"schema": {
|
|
111
|
+
"$ref": "#/components/schemas/ISaleArticle.IStore"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": true
|
|
116
|
+
},
|
|
117
|
+
"responses": {
|
|
118
|
+
"201": {
|
|
119
|
+
"description": "The newly created content record",
|
|
120
|
+
"content": {
|
|
121
|
+
"application/json": {
|
|
122
|
+
"schema": {
|
|
123
|
+
"$ref": "#/components/schemas/ISaleInquiry_lt_ISaleArticle.IContent_gt_"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"400": {
|
|
129
|
+
"description": "bad request error when type of the input data is not valid"
|
|
130
|
+
},
|
|
131
|
+
"401": {
|
|
132
|
+
"description": "unauthorized error when you've not logged in yet"
|
|
133
|
+
},
|
|
134
|
+
"403": {
|
|
135
|
+
"description": "forbidden error when the article is not yours"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"description": "Update an inquiry.\n\nUpdate ordinary inquiry article. However, it would not modify the content reocrd\n{@link ISaleInquiry.IContent}, but be accumulated into the {@link ISaleInquiry.contents}.\nTherefore, all of the poeple can read how the content has been changed."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"/consumers/{section}/sales/{saleId}/reviews": {
|
|
142
|
+
"post": {
|
|
143
|
+
"tags": [],
|
|
144
|
+
"parameters": [
|
|
145
|
+
{
|
|
146
|
+
"name": "section",
|
|
147
|
+
"in": "path",
|
|
148
|
+
"description": "Code of the target section",
|
|
149
|
+
"schema": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"nullable": false
|
|
152
|
+
},
|
|
153
|
+
"required": true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "saleId",
|
|
157
|
+
"in": "path",
|
|
158
|
+
"description": "ID of the target sale",
|
|
159
|
+
"schema": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"nullable": false
|
|
162
|
+
},
|
|
163
|
+
"required": true
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"requestBody": {
|
|
167
|
+
"description": "Content to archive",
|
|
168
|
+
"content": {
|
|
169
|
+
"application/json": {
|
|
170
|
+
"schema": {
|
|
171
|
+
"$ref": "#/components/schemas/ISaleReview.IStore"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"required": true
|
|
176
|
+
},
|
|
177
|
+
"responses": {
|
|
178
|
+
"201": {
|
|
179
|
+
"description": "Newly archived inquiry",
|
|
180
|
+
"content": {
|
|
181
|
+
"application/json": {
|
|
182
|
+
"schema": {
|
|
183
|
+
"$ref": "#/components/schemas/ISaleInquiry_lt_ISaleReview.IContent_gt_"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"400": {
|
|
189
|
+
"description": "bad request error when type of the input data is not valid"
|
|
190
|
+
},
|
|
191
|
+
"401": {
|
|
192
|
+
"description": "unauthorized error when you've not logged in yet"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"description": "Store a new inquiry.\n\nWrite a new article inquirying about a sale."
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"/consumers/{section}/sales/{saleId}/reviews/{id}": {
|
|
199
|
+
"put": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"parameters": [
|
|
202
|
+
{
|
|
203
|
+
"name": "section",
|
|
204
|
+
"in": "path",
|
|
205
|
+
"description": "Code of the target section",
|
|
206
|
+
"schema": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"nullable": false
|
|
209
|
+
},
|
|
210
|
+
"required": true
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "saleId",
|
|
214
|
+
"in": "path",
|
|
215
|
+
"description": "ID of the target sale",
|
|
216
|
+
"schema": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"nullable": false
|
|
219
|
+
},
|
|
220
|
+
"required": true
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "id",
|
|
224
|
+
"in": "path",
|
|
225
|
+
"description": "ID of the target article to be updated",
|
|
226
|
+
"schema": {
|
|
227
|
+
"type": "number",
|
|
228
|
+
"nullable": false
|
|
229
|
+
},
|
|
230
|
+
"required": true
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"requestBody": {
|
|
234
|
+
"description": "New content to be overwritten",
|
|
235
|
+
"content": {
|
|
236
|
+
"application/json": {
|
|
237
|
+
"schema": {
|
|
238
|
+
"$ref": "#/components/schemas/ISaleReview.IStore"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"required": true
|
|
243
|
+
},
|
|
244
|
+
"responses": {
|
|
245
|
+
"201": {
|
|
246
|
+
"description": "The newly created content record",
|
|
247
|
+
"content": {
|
|
248
|
+
"application/json": {
|
|
249
|
+
"schema": {
|
|
250
|
+
"$ref": "#/components/schemas/ISaleInquiry_lt_ISaleReview.IContent_gt_"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"400": {
|
|
256
|
+
"description": "bad request error when type of the input data is not valid"
|
|
257
|
+
},
|
|
258
|
+
"401": {
|
|
259
|
+
"description": "unauthorized error when you've not logged in yet"
|
|
260
|
+
},
|
|
261
|
+
"403": {
|
|
262
|
+
"description": "forbidden error when the article is not yours"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"description": "Update an inquiry.\n\nUpdate ordinary inquiry article. However, it would not modify the content reocrd\n{@link ISaleInquiry.IContent}, but be accumulated into the {@link ISaleInquiry.contents}.\nTherefore, all of the poeple can read how the content has been changed."
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"components": {
|
|
270
|
+
"schemas": {
|
|
271
|
+
"ISaleArticle.IStore": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"properties": {
|
|
274
|
+
"title": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"nullable": false,
|
|
277
|
+
"description": "Title of the content."
|
|
278
|
+
},
|
|
279
|
+
"body": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"nullable": false,
|
|
282
|
+
"description": "Body of the content."
|
|
283
|
+
},
|
|
284
|
+
"extension": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"enum": [
|
|
287
|
+
"html",
|
|
288
|
+
"md",
|
|
289
|
+
"txt"
|
|
290
|
+
],
|
|
291
|
+
"nullable": false,
|
|
292
|
+
"description": "Extension, content type (format)."
|
|
293
|
+
},
|
|
294
|
+
"files": {
|
|
295
|
+
"type": "array",
|
|
296
|
+
"items": {
|
|
297
|
+
"$ref": "#/components/schemas/IAttachmentFile",
|
|
298
|
+
"description": "Attached files."
|
|
299
|
+
},
|
|
300
|
+
"nullable": false,
|
|
301
|
+
"description": "Attached files."
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"nullable": false,
|
|
305
|
+
"required": [
|
|
306
|
+
"title",
|
|
307
|
+
"body",
|
|
308
|
+
"extension",
|
|
309
|
+
"files"
|
|
310
|
+
],
|
|
311
|
+
"description": "Store info.",
|
|
312
|
+
"jsDocTags": []
|
|
313
|
+
},
|
|
314
|
+
"IAttachmentFile": {
|
|
315
|
+
"type": "object",
|
|
316
|
+
"properties": {
|
|
317
|
+
"name": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"nullable": false,
|
|
320
|
+
"description": "Name of the file."
|
|
321
|
+
},
|
|
322
|
+
"extension": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"nullable": true,
|
|
325
|
+
"description": "Extension of the file, but ommitable."
|
|
326
|
+
},
|
|
327
|
+
"url": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"nullable": false,
|
|
330
|
+
"description": "Full URL path of the file."
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"nullable": false,
|
|
334
|
+
"required": [
|
|
335
|
+
"name",
|
|
336
|
+
"extension",
|
|
337
|
+
"url"
|
|
338
|
+
],
|
|
339
|
+
"description": "Attachemd (physical) file info.",
|
|
340
|
+
"jsDocTags": [
|
|
341
|
+
{
|
|
342
|
+
"name": "author",
|
|
343
|
+
"text": [
|
|
344
|
+
{
|
|
345
|
+
"text": "Jeongho Nam - https://github.com/samchon",
|
|
346
|
+
"kind": "text"
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
"ISaleInquiry_lt_ISaleArticle.IContent_gt_": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"properties": {
|
|
355
|
+
"writer": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"nullable": false,
|
|
358
|
+
"description": "Name of the writer."
|
|
359
|
+
},
|
|
360
|
+
"answer": {
|
|
361
|
+
"$ref": "#/components/schemas/ISaleArticle_lt_ISaleArticle.IContent_gt_.Nullable",
|
|
362
|
+
"description": "Formal answer from the seller."
|
|
363
|
+
},
|
|
364
|
+
"id": {
|
|
365
|
+
"type": "number",
|
|
366
|
+
"nullable": false,
|
|
367
|
+
"description": "Primary Key."
|
|
368
|
+
},
|
|
369
|
+
"hit": {
|
|
370
|
+
"type": "number",
|
|
371
|
+
"nullable": false,
|
|
372
|
+
"description": "Hit count.\n\nHow many consumers had read."
|
|
373
|
+
},
|
|
374
|
+
"contents": {
|
|
375
|
+
"type": "array",
|
|
376
|
+
"items": {
|
|
377
|
+
"$ref": "#/components/schemas/ISaleArticle.IContent",
|
|
378
|
+
"description": "List of contents.\n\nWhen the article writer tries to modify content, it would not modify the article\ncontent but would be accumulated. Therefore, all of the people can read how\nthe content has been changed."
|
|
379
|
+
},
|
|
380
|
+
"nullable": false,
|
|
381
|
+
"description": "List of contents.\n\nWhen the article writer tries to modify content, it would not modify the article\ncontent but would be accumulated. Therefore, all of the people can read how\nthe content has been changed."
|
|
382
|
+
},
|
|
383
|
+
"created_at": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"nullable": false,
|
|
386
|
+
"description": "Creation time."
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"nullable": false,
|
|
390
|
+
"required": [
|
|
391
|
+
"writer",
|
|
392
|
+
"answer",
|
|
393
|
+
"id",
|
|
394
|
+
"hit",
|
|
395
|
+
"contents",
|
|
396
|
+
"created_at"
|
|
397
|
+
],
|
|
398
|
+
"description": "Inquiry article.\n\nSub-type of article and super-type of question and answer.",
|
|
399
|
+
"jsDocTags": [
|
|
400
|
+
{
|
|
401
|
+
"name": "template",
|
|
402
|
+
"text": [
|
|
403
|
+
{
|
|
404
|
+
"text": "Content",
|
|
405
|
+
"kind": "typeParameterName"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"text": " ",
|
|
409
|
+
"kind": "space"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"text": "Content type",
|
|
413
|
+
"kind": "text"
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "author",
|
|
419
|
+
"text": [
|
|
420
|
+
{
|
|
421
|
+
"text": "Jeongho Nam - https://github.com/samchon",
|
|
422
|
+
"kind": "text"
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
"ISaleArticle_lt_ISaleArticle.IContent_gt_.Nullable": {
|
|
429
|
+
"type": "object",
|
|
430
|
+
"properties": {
|
|
431
|
+
"id": {
|
|
432
|
+
"type": "number",
|
|
433
|
+
"nullable": false,
|
|
434
|
+
"description": "Primary Key."
|
|
435
|
+
},
|
|
436
|
+
"hit": {
|
|
437
|
+
"type": "number",
|
|
438
|
+
"nullable": false,
|
|
439
|
+
"description": "Hit count.\n\nHow many consumers had read."
|
|
440
|
+
},
|
|
441
|
+
"contents": {
|
|
442
|
+
"type": "array",
|
|
443
|
+
"items": {
|
|
444
|
+
"$ref": "#/components/schemas/ISaleArticle.IContent",
|
|
445
|
+
"description": "List of contents.\n\nWhen the article writer tries to modify content, it would not modify the article\ncontent but would be accumulated. Therefore, all of the people can read how\nthe content has been changed."
|
|
446
|
+
},
|
|
447
|
+
"nullable": false,
|
|
448
|
+
"description": "List of contents.\n\nWhen the article writer tries to modify content, it would not modify the article\ncontent but would be accumulated. Therefore, all of the people can read how\nthe content has been changed."
|
|
449
|
+
},
|
|
450
|
+
"created_at": {
|
|
451
|
+
"type": "string",
|
|
452
|
+
"nullable": false,
|
|
453
|
+
"description": "Creation time."
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"nullable": true,
|
|
457
|
+
"required": [
|
|
458
|
+
"id",
|
|
459
|
+
"hit",
|
|
460
|
+
"contents",
|
|
461
|
+
"created_at"
|
|
462
|
+
],
|
|
463
|
+
"description": "Article about a sale.\n\nThe `ISaleArticle` is a super type interface. Many sub-type articles would be\ndesigned by extending this super type interface `ISaleArticle`.",
|
|
464
|
+
"jsDocTags": [
|
|
465
|
+
{
|
|
466
|
+
"name": "template",
|
|
467
|
+
"text": [
|
|
468
|
+
{
|
|
469
|
+
"text": "Content",
|
|
470
|
+
"kind": "typeParameterName"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"text": " ",
|
|
474
|
+
"kind": "space"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"text": "Content type.",
|
|
478
|
+
"kind": "text"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "author",
|
|
484
|
+
"text": [
|
|
485
|
+
{
|
|
486
|
+
"text": "Jeongho Nam - https://github.com/samchon",
|
|
487
|
+
"kind": "text"
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
]
|
|
492
|
+
},
|
|
493
|
+
"ISaleArticle.IContent": {
|
|
494
|
+
"type": "object",
|
|
495
|
+
"properties": {
|
|
496
|
+
"id": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"nullable": false,
|
|
499
|
+
"description": "Primary Key"
|
|
500
|
+
},
|
|
501
|
+
"created_at": {
|
|
502
|
+
"type": "string",
|
|
503
|
+
"nullable": false,
|
|
504
|
+
"description": "Creation time."
|
|
505
|
+
},
|
|
506
|
+
"title": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"nullable": false,
|
|
509
|
+
"description": "Title of the content."
|
|
510
|
+
},
|
|
511
|
+
"body": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"nullable": false,
|
|
514
|
+
"description": "Body of the content."
|
|
515
|
+
},
|
|
516
|
+
"extension": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"enum": [
|
|
519
|
+
"html",
|
|
520
|
+
"md",
|
|
521
|
+
"txt"
|
|
522
|
+
],
|
|
523
|
+
"nullable": false,
|
|
524
|
+
"description": "Extension, content type (format)."
|
|
525
|
+
},
|
|
526
|
+
"files": {
|
|
527
|
+
"type": "array",
|
|
528
|
+
"items": {
|
|
529
|
+
"$ref": "#/components/schemas/IAttachmentFile",
|
|
530
|
+
"description": "Attached files."
|
|
531
|
+
},
|
|
532
|
+
"nullable": false,
|
|
533
|
+
"description": "Attached files."
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"nullable": false,
|
|
537
|
+
"required": [
|
|
538
|
+
"id",
|
|
539
|
+
"created_at",
|
|
540
|
+
"title",
|
|
541
|
+
"body",
|
|
542
|
+
"extension",
|
|
543
|
+
"files"
|
|
544
|
+
],
|
|
545
|
+
"description": "Content info.",
|
|
546
|
+
"jsDocTags": []
|
|
547
|
+
},
|
|
548
|
+
"ISaleReview.IStore": {
|
|
549
|
+
"type": "object",
|
|
550
|
+
"properties": {
|
|
551
|
+
"score": {
|
|
552
|
+
"type": "number",
|
|
553
|
+
"nullable": false,
|
|
554
|
+
"description": "Estimation score."
|
|
555
|
+
},
|
|
556
|
+
"title": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"nullable": false,
|
|
559
|
+
"description": "Title of the content."
|
|
560
|
+
},
|
|
561
|
+
"body": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"nullable": false,
|
|
564
|
+
"description": "Body of the content."
|
|
565
|
+
},
|
|
566
|
+
"extension": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"enum": [
|
|
569
|
+
"html",
|
|
570
|
+
"md",
|
|
571
|
+
"txt"
|
|
572
|
+
],
|
|
573
|
+
"nullable": false,
|
|
574
|
+
"description": "Extension, content type (format)."
|
|
575
|
+
},
|
|
576
|
+
"files": {
|
|
577
|
+
"type": "array",
|
|
578
|
+
"items": {
|
|
579
|
+
"$ref": "#/components/schemas/IAttachmentFile",
|
|
580
|
+
"description": "Attached files."
|
|
581
|
+
},
|
|
582
|
+
"nullable": false,
|
|
583
|
+
"description": "Attached files."
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"nullable": false,
|
|
587
|
+
"required": [
|
|
588
|
+
"score",
|
|
589
|
+
"title",
|
|
590
|
+
"body",
|
|
591
|
+
"extension",
|
|
592
|
+
"files"
|
|
593
|
+
],
|
|
594
|
+
"description": "Store info of the review.",
|
|
595
|
+
"jsDocTags": []
|
|
596
|
+
},
|
|
597
|
+
"ISaleInquiry_lt_ISaleReview.IContent_gt_": {
|
|
598
|
+
"type": "object",
|
|
599
|
+
"properties": {
|
|
600
|
+
"writer": {
|
|
601
|
+
"type": "string",
|
|
602
|
+
"nullable": false,
|
|
603
|
+
"description": "Name of the writer."
|
|
604
|
+
},
|
|
605
|
+
"answer": {
|
|
606
|
+
"$ref": "#/components/schemas/ISaleArticle_lt_ISaleArticle.IContent_gt_.Nullable",
|
|
607
|
+
"description": "Formal answer from the seller."
|
|
608
|
+
},
|
|
609
|
+
"id": {
|
|
610
|
+
"type": "number",
|
|
611
|
+
"nullable": false,
|
|
612
|
+
"description": "Primary Key."
|
|
613
|
+
},
|
|
614
|
+
"hit": {
|
|
615
|
+
"type": "number",
|
|
616
|
+
"nullable": false,
|
|
617
|
+
"description": "Hit count.\n\nHow many consumers had read."
|
|
618
|
+
},
|
|
619
|
+
"contents": {
|
|
620
|
+
"type": "array",
|
|
621
|
+
"items": {
|
|
622
|
+
"$ref": "#/components/schemas/ISaleReview.IContent",
|
|
623
|
+
"description": "List of contents.\n\nWhen the article writer tries to modify content, it would not modify the article\ncontent but would be accumulated. Therefore, all of the people can read how\nthe content has been changed."
|
|
624
|
+
},
|
|
625
|
+
"nullable": false,
|
|
626
|
+
"description": "List of contents.\n\nWhen the article writer tries to modify content, it would not modify the article\ncontent but would be accumulated. Therefore, all of the people can read how\nthe content has been changed."
|
|
627
|
+
},
|
|
628
|
+
"created_at": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"nullable": false,
|
|
631
|
+
"description": "Creation time."
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
"nullable": false,
|
|
635
|
+
"required": [
|
|
636
|
+
"writer",
|
|
637
|
+
"answer",
|
|
638
|
+
"id",
|
|
639
|
+
"hit",
|
|
640
|
+
"contents",
|
|
641
|
+
"created_at"
|
|
642
|
+
],
|
|
643
|
+
"description": "Inquiry article.\n\nSub-type of article and super-type of question and answer.",
|
|
644
|
+
"jsDocTags": [
|
|
645
|
+
{
|
|
646
|
+
"name": "template",
|
|
647
|
+
"text": [
|
|
648
|
+
{
|
|
649
|
+
"text": "Content",
|
|
650
|
+
"kind": "typeParameterName"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"text": " ",
|
|
654
|
+
"kind": "space"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"text": "Content type",
|
|
658
|
+
"kind": "text"
|
|
659
|
+
}
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "author",
|
|
664
|
+
"text": [
|
|
665
|
+
{
|
|
666
|
+
"text": "Jeongho Nam - https://github.com/samchon",
|
|
667
|
+
"kind": "text"
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
}
|
|
671
|
+
]
|
|
672
|
+
},
|
|
673
|
+
"ISaleReview.IContent": {
|
|
674
|
+
"type": "object",
|
|
675
|
+
"properties": {
|
|
676
|
+
"score": {
|
|
677
|
+
"type": "number",
|
|
678
|
+
"nullable": false,
|
|
679
|
+
"description": "Estimation score."
|
|
680
|
+
},
|
|
681
|
+
"id": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"nullable": false,
|
|
684
|
+
"description": "Primary Key"
|
|
685
|
+
},
|
|
686
|
+
"created_at": {
|
|
687
|
+
"type": "string",
|
|
688
|
+
"nullable": false,
|
|
689
|
+
"description": "Creation time."
|
|
690
|
+
},
|
|
691
|
+
"title": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"nullable": false,
|
|
694
|
+
"description": "Title of the content."
|
|
695
|
+
},
|
|
696
|
+
"body": {
|
|
697
|
+
"type": "string",
|
|
698
|
+
"nullable": false,
|
|
699
|
+
"description": "Body of the content."
|
|
700
|
+
},
|
|
701
|
+
"extension": {
|
|
702
|
+
"type": "string",
|
|
703
|
+
"enum": [
|
|
704
|
+
"html",
|
|
705
|
+
"md",
|
|
706
|
+
"txt"
|
|
707
|
+
],
|
|
708
|
+
"nullable": false,
|
|
709
|
+
"description": "Extension, content type (format)."
|
|
710
|
+
},
|
|
711
|
+
"files": {
|
|
712
|
+
"type": "array",
|
|
713
|
+
"items": {
|
|
714
|
+
"$ref": "#/components/schemas/IAttachmentFile",
|
|
715
|
+
"description": "Attached files."
|
|
716
|
+
},
|
|
717
|
+
"nullable": false,
|
|
718
|
+
"description": "Attached files."
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"nullable": false,
|
|
722
|
+
"required": [
|
|
723
|
+
"score",
|
|
724
|
+
"id",
|
|
725
|
+
"created_at",
|
|
726
|
+
"title",
|
|
727
|
+
"body",
|
|
728
|
+
"extension",
|
|
729
|
+
"files"
|
|
730
|
+
],
|
|
731
|
+
"description": "Content info of the review.",
|
|
732
|
+
"jsDocTags": []
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}
|