|
|
@@ -14,26 +14,28 @@ const logger = loggerFactory('growi:routes:search');
|
|
|
*
|
|
|
* components:
|
|
|
* schemas:
|
|
|
+ * ElasticsearchResultMeta:
|
|
|
+ * type: object
|
|
|
+ * properties:
|
|
|
+ * took:
|
|
|
+ * type: number
|
|
|
+ * description: Time Elasticsearch took to execute a search(milliseconds)
|
|
|
+ * example: 34
|
|
|
+ * total:
|
|
|
+ * type: number
|
|
|
+ * description: Number of documents matching search criteria
|
|
|
+ * example: 2
|
|
|
+ * results:
|
|
|
+ * type: number
|
|
|
+ * description: Actual array length of search results
|
|
|
+ * example: 2
|
|
|
+ *
|
|
|
* ElasticsearchResult:
|
|
|
* description: Elasticsearch result v1
|
|
|
* type: object
|
|
|
* properties:
|
|
|
* meta:
|
|
|
- * type: object
|
|
|
- * properties:
|
|
|
- * took:
|
|
|
- * type: number
|
|
|
- * description: Time Elasticsearch took to execute a search(milliseconds)
|
|
|
- * example: 34
|
|
|
- * total:
|
|
|
- * type: number
|
|
|
- * description: Number of documents matching search criteria
|
|
|
- * example: 2
|
|
|
- * results:
|
|
|
- * type: number
|
|
|
- * description: Actual array length of search results
|
|
|
- * example: 2
|
|
|
- *
|
|
|
+ * $ref: '#/components/schemas/ElasticsearchResultMeta'
|
|
|
*/
|
|
|
module.exports = function(crowi: Crowi, app) {
|
|
|
const ApiResponse = require('../util/apiResponse');
|
|
|
@@ -81,7 +83,7 @@ module.exports = function(crowi: Crowi, app) {
|
|
|
* ok:
|
|
|
* $ref: '#/components/schemas/V1ResponseOK'
|
|
|
* meta:
|
|
|
- * $ref: '#/components/schemas/ElasticsearchResult/properties/meta'
|
|
|
+ * $ref: '#/components/schemas/ElasticsearchResultMeta'
|
|
|
* totalCount:
|
|
|
* type: integer
|
|
|
* description: total count of pages
|