diff --git a/.eslintrc.js b/.eslintrc.js index 7aa22edac1b..9f3f443f6fe 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,7 +13,16 @@ module.exports = { parser: 'yaml-eslint-parser', plugins: ["automation-custom"], rules: { - '@typescript-eslint/naming-convention': 0, + 'yml/plain-scalar': [ + 2, + "always" + , { + // ignore path from ref, that must be quoted + ignorePatterns: [ + '[./#a-zA-Z0-9_]+' + ] + } + ], 'yml/quotes': [ 2, { @@ -35,7 +44,16 @@ module.exports = { files: ['specs/**/*.yml'], rules: { "automation-custom/description-dot": "error", - } + "automation-custom/single-quote-ref": "error", + }, + overrides: [ + { + files: ['!specs/bundled/*.yml'], + rules: { + "automation-custom/out-of-line-enum": "error", + } + } + ] } ] }, diff --git a/.github/.cache_version b/.github/.cache_version index a3fcc7121bb..0ee843cc604 100644 --- a/.github/.cache_version +++ b/.github/.cache_version @@ -1 +1 @@ -7.1.0 +7.2.0 diff --git a/eslint/src/index.ts b/eslint/src/index.ts index c2679281ec7..b7f30854ba2 100644 --- a/eslint/src/index.ts +++ b/eslint/src/index.ts @@ -1,7 +1,11 @@ import { descriptionDot } from './rules/descriptionDot'; +import { outOfLineEnum } from './rules/outOfLineEnum'; +import { singleQuoteRef } from './rules/singleQuoteRef'; const rules = { 'description-dot': descriptionDot, + 'out-of-line-enum': outOfLineEnum, + 'single-quote-ref': singleQuoteRef, }; export { rules }; diff --git a/eslint/src/rules/outOfLineEnum.ts b/eslint/src/rules/outOfLineEnum.ts new file mode 100644 index 00000000000..ea7c64a50a2 --- /dev/null +++ b/eslint/src/rules/outOfLineEnum.ts @@ -0,0 +1,44 @@ +import type { Rule } from 'eslint'; + +import { isPairWithKey } from '../utils'; + +export const outOfLineEnum: Rule.RuleModule = { + meta: { + docs: { + description: 'enum must be out of line', + }, + messages: { + enumNotOutOfLine: 'enum is not out of line', + }, + }, + create(context) { + if (!context.parserServices.isYAML) { + return {}; + } + + return { + YAMLPair(node): void { + if (!isPairWithKey(node, 'enum')) { + return; + } + // parent is mapping, and parent is real parent that must be to the far left + if (node.parent.parent.loc.start.column === 0) { + return; + } + if ( + isPairWithKey( + node.parent.parent.parent.parent?.parent?.parent?.parent ?? null, + 'servers' + ) + ) { + // accept out of line enum if in servers + return; + } + context.report({ + node: node.parent.parent as any, + messageId: 'enumNotOutOfLine', + }); + }, + }; + }, +}; diff --git a/eslint/src/rules/singleQuoteRef.ts b/eslint/src/rules/singleQuoteRef.ts new file mode 100644 index 00000000000..84742a13c70 --- /dev/null +++ b/eslint/src/rules/singleQuoteRef.ts @@ -0,0 +1,55 @@ +import type { Rule } from 'eslint'; + +import { isBLockScalar, isPairWithKey, isScalar } from '../utils'; + +export const singleQuoteRef: Rule.RuleModule = { + meta: { + docs: { + description: '$ref must be wrapped in single quote', + }, + messages: { + refNoQuote: '$ref is not wrapped in single quote', + }, + fixable: 'code', + }, + create(context) { + if (!context.parserServices.isYAML) { + return {}; + } + + return { + YAMLPair(node): void { + if (!isPairWithKey(node, '$ref')) { + return; + } + if (!isScalar(node.value)) { + // not our problem, something else will fail like path resolution + return; + } + if (node.value.style === 'single-quoted') { + // that's what we want + return; + } + if (isBLockScalar(node.value)) { + // another rule should take care of that case + return; + } + const hasDoubleQuote = node.value.style === 'double-quoted'; + const [start, end] = node.value.range; + context.report({ + node: node as any, + messageId: 'refNoQuote', + *fix(fixer) { + if (hasDoubleQuote) { + yield fixer.replaceTextRange([start, start + 1], "'"); + yield fixer.replaceTextRange([end - 1, end], "'"); + } else { + yield fixer.insertTextBeforeRange([start, start], "'"); + yield fixer.insertTextAfterRange([end, end], "'"); + } + }, + }); + }, + }; + }, +}; diff --git a/eslint/tests/outOfLineEnum.test.ts b/eslint/tests/outOfLineEnum.test.ts new file mode 100644 index 00000000000..22db0e3ef13 --- /dev/null +++ b/eslint/tests/outOfLineEnum.test.ts @@ -0,0 +1,66 @@ +import { RuleTester } from 'eslint'; + +import { outOfLineEnum } from '../src/rules/outOfLineEnum'; + +const ruleTester = new RuleTester({ + parser: require.resolve('yaml-eslint-parser'), +}); + +ruleTester.run('out-of-line-enum', outOfLineEnum, { + valid: [ + ` +simple: + type: string + enum: [bla, blabla] +`, + ` +simple: + type: string + enum: + - bla + - blabla +`, + ` +simple: + type: string + enum: [bla, blabla] + +useIt: + $ref: '#/simple' +`, + ` +servers: + - url: http://test-server.com + variables: + region: + default: us + enum: + - us + - de +`, + ], + invalid: [ + { + code: ` +root: + inside: + type: string + enum: [bla, blabla] + `, + errors: [{ messageId: 'enumNotOutOfLine' }], + }, + { + code: ` +root: + inside: + deeper: + type: string + enum: [bla, blabla] + +useIt: + $ref: '#/root/inside/deeper' + `, + errors: [{ messageId: 'enumNotOutOfLine' }], + }, + ], +}); diff --git a/eslint/tests/singleQuoteRef.test.ts b/eslint/tests/singleQuoteRef.test.ts new file mode 100644 index 00000000000..434bb844249 --- /dev/null +++ b/eslint/tests/singleQuoteRef.test.ts @@ -0,0 +1,82 @@ +import { RuleTester } from 'eslint'; + +import { singleQuoteRef } from '../src/rules/singleQuoteRef'; + +const ruleTester = new RuleTester({ + parser: require.resolve('yaml-eslint-parser'), +}); + +ruleTester.run('single-quote-ref', singleQuoteRef, { + valid: [ + ` +simple: + $ref: 'random/path.yml'`, + ` +sameFile: + $ref: '#/inside'`, + ` +long: + $ref: 'some/random/file.yml#/root/object/prop' +`, + ` +post: + description: test desc. + '400': + $ref: '../../common/responses/BadRequest.yml' +`, + ], + invalid: [ + { + code: ` +simple: + $ref: random/path.yml +`, + errors: [{ messageId: 'refNoQuote' }], + output: ` +simple: + $ref: 'random/path.yml' +`, + }, + { + code: ` +long: + $ref: some/random/file.yml#/root/object/prop +`, + errors: [{ messageId: 'refNoQuote' }], + output: ` +long: + $ref: 'some/random/file.yml#/root/object/prop' +`, + }, + { + code: ` +post: + description: test desc. + '400': + $ref: ../../common/responses/BadRequest.yml + '404': + $ref: ../../common/responses/IndexNotFound.yml +`, + errors: [{ messageId: 'refNoQuote' }, { messageId: 'refNoQuote' }], + output: ` +post: + description: test desc. + '400': + $ref: '../../common/responses/BadRequest.yml' + '404': + $ref: '../../common/responses/IndexNotFound.yml' +`, + }, + { + code: ` +double: + $ref: "some/ref" +`, + errors: [{ messageId: 'refNoQuote' }], + output: ` +double: + $ref: 'some/ref' +`, + }, + ], +}); diff --git a/scripts/buildSpecs.ts b/scripts/buildSpecs.ts index 1f211c9f46c..aa916ded5ca 100644 --- a/scripts/buildSpecs.ts +++ b/scripts/buildSpecs.ts @@ -41,6 +41,39 @@ async function propagateTagsToOperations( return true; } +async function lintCommon(verbose: boolean, useCache: boolean): Promise { + let hash = ''; + const cacheFile = toAbsolutePath(`specs/dist/common.cache`); + if (useCache) { + const { cacheExists, hash: newCache } = await checkForCache( + { + job: 'common specs', + folder: toAbsolutePath('specs/'), + generatedFiles: [], + filesToCache: ['common'], + cacheFile, + }, + verbose + ); + + if (cacheExists) { + return; + } + + hash = newCache; + } + + const spinner = createSpinner('linting common spec', verbose).start(); + await run(`yarn specs:lint common`, { verbose }); + + if (hash) { + spinner.text = `storing common spec cache`; + await fsp.writeFile(cacheFile, hash); + } + + spinner.succeed(); +} + async function buildSpec( client: string, outputFormat: string, @@ -87,7 +120,7 @@ async function buildSpec( } spinner.text = `linting ${client} spec`; - await run(`yarn specs:lint ${client}`, { verbose }); + await run(`yarn specs:fix ${client}`, { verbose }); spinner.text = `validating ${client} spec`; await run(`yarn openapi lint specs/bundled/${client}.${outputFormat}`, { @@ -113,6 +146,8 @@ export async function buildSpecs( ): Promise { await fsp.mkdir(toAbsolutePath('specs/dist'), { recursive: true }); + await lintCommon(verbose, useCache); + await Promise.all( clients.map((client) => buildSpec(client, outputFormat, verbose, useCache)) ); diff --git a/specs/abtesting/common/schemas/ABTest.yml b/specs/abtesting/common/schemas/ABTest.yml index 048c00c0324..d3e05324382 100644 --- a/specs/abtesting/common/schemas/ABTest.yml +++ b/specs/abtesting/common/schemas/ABTest.yml @@ -9,7 +9,7 @@ ABTest: additionalProperties: false properties: abTestID: - $ref: ../parameters.yml#/abTestID + $ref: '../parameters.yml#/abTestID' clickSignificance: type: number format: double @@ -19,16 +19,16 @@ ABTest: format: double description: A/B test significance based on conversion data. Should be > 0.95 to be considered significant (no matter which variant is winning). endAt: - $ref: ../parameters.yml#/endAt + $ref: '../parameters.yml#/endAt' createdAt: - $ref: ../parameters.yml#/createdAt + $ref: '../parameters.yml#/createdAt' name: - $ref: ../parameters.yml#/name + $ref: '../parameters.yml#/name' status: type: string description: status of the A/B test. variants: - $ref: Variant.yml#/variants + $ref: 'Variant.yml#/variants' required: - status - name diff --git a/specs/abtesting/common/schemas/ABTestResponse.yml b/specs/abtesting/common/schemas/ABTestResponse.yml index 8e6a05dfafe..3475ce1c2e3 100644 --- a/specs/abtesting/common/schemas/ABTestResponse.yml +++ b/specs/abtesting/common/schemas/ABTestResponse.yml @@ -3,11 +3,11 @@ ABTestResponse: additionalProperties: false properties: index: - $ref: ../parameters.yml#/index + $ref: '../parameters.yml#/index' abTestID: - $ref: ../parameters.yml#/abTestID + $ref: '../parameters.yml#/abTestID' taskID: - $ref: ../../../common/parameters.yml#/taskID + $ref: '../../../common/parameters.yml#/taskID' required: - abTestID - index diff --git a/specs/abtesting/common/schemas/AddABTestsVariant.yml b/specs/abtesting/common/schemas/AddABTestsVariant.yml index 2c92be075b5..6a4ca55e68d 100644 --- a/specs/abtesting/common/schemas/AddABTestsVariant.yml +++ b/specs/abtesting/common/schemas/AddABTestsVariant.yml @@ -13,11 +13,11 @@ abTestsVariant: additionalProperties: false properties: index: - $ref: ../parameters.yml#/index + $ref: '../parameters.yml#/index' trafficPercentage: - $ref: ../parameters.yml#/trafficPercentage + $ref: '../parameters.yml#/trafficPercentage' description: - $ref: ../parameters.yml#/description + $ref: '../parameters.yml#/description' required: - index - trafficPercentage diff --git a/specs/abtesting/common/schemas/Variant.yml b/specs/abtesting/common/schemas/Variant.yml index 38405ce5244..7d8415cf474 100644 --- a/specs/abtesting/common/schemas/Variant.yml +++ b/specs/abtesting/common/schemas/Variant.yml @@ -26,18 +26,18 @@ variant: format: double description: Conversion rate for the variant. description: - $ref: ../parameters.yml#/description + $ref: '../parameters.yml#/description' index: - $ref: ../parameters.yml#/index + $ref: '../parameters.yml#/index' noResultCount: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' searchCount: type: integer description: The number of search during the A/B test. trackedSearchCount: - $ref: ../../../common/parameters.yml#/trackedSearchCount + $ref: '../../../common/parameters.yml#/trackedSearchCount' trafficPercentage: - $ref: ../parameters.yml#/trafficPercentage + $ref: '../parameters.yml#/trafficPercentage' userCount: type: integer description: The number of user during the A/B test. diff --git a/specs/abtesting/paths/abtest.yml b/specs/abtesting/paths/abtest.yml index a44ba3c757f..91c4b14e22b 100644 --- a/specs/abtesting/paths/abtest.yml +++ b/specs/abtesting/paths/abtest.yml @@ -6,41 +6,41 @@ get: Behaves in the same way as GET /2/abtests however the endpoint will return 403. summary: Returns metadata and metrics for A/B test id. parameters: - - $ref: ../common/parameters.yml#/ID + - $ref: '../common/parameters.yml#/ID' responses: '200': description: OK content: application/json: schema: - $ref: ../common/schemas/ABTest.yml#/ABTest + $ref: '../common/schemas/ABTest.yml#/ABTest' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' delete: operationId: deleteABTest description: Deletes the A/B Test and removes all associated metadata & metrics. summary: Deletes the A/B Test. parameters: - - $ref: ../common/parameters.yml#/ID + - $ref: '../common/parameters.yml#/ID' responses: '200': description: OK content: application/json: schema: - $ref: ../common/schemas/ABTestResponse.yml#/ABTestResponse + $ref: '../common/schemas/ABTestResponse.yml#/ABTestResponse' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/abtesting/paths/abtests.yml b/specs/abtesting/paths/abtests.yml index e1debbe8229..8f075a5a867 100644 --- a/specs/abtesting/paths/abtests.yml +++ b/specs/abtesting/paths/abtests.yml @@ -15,16 +15,16 @@ post: additionalProperties: false properties: name: - $ref: ../common/parameters.yml#/name + $ref: '../common/parameters.yml#/name' variant: type: array description: List of 2 variants for the A/B test. minItems: 2 maxItems: 2 items: - $ref: ../common/schemas/AddABTestsVariant.yml#/AddABTestsVariant + $ref: '../common/schemas/AddABTestsVariant.yml#/AddABTestsVariant' endAt: - $ref: ../common/parameters.yml#/endAt + $ref: '../common/parameters.yml#/endAt' required: - name - variant @@ -35,15 +35,15 @@ post: content: application/json: schema: - $ref: ../common/schemas/ABTestResponse.yml#/ABTestResponse + $ref: '../common/schemas/ABTestResponse.yml#/ABTestResponse' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' get: operationId: listABTests @@ -51,8 +51,8 @@ get: Fetch all existing A/B tests for App that are available for the current API Key. Returns an array of metadata and metrics. When no data has been processed, the metrics will be returned as null. summary: Fetch all existing A/B tests for App that are available for the current API Key. parameters: - - $ref: ../../common/parameters.yml#/Offset - - $ref: ../../common/parameters.yml#/Limit + - $ref: '../../common/parameters.yml#/Offset' + - $ref: '../../common/parameters.yml#/Limit' responses: '200': description: OK @@ -64,7 +64,7 @@ get: additionalProperties: false properties: abtests: - $ref: ../common/schemas/ABTest.yml#/ABTests + $ref: '../common/schemas/ABTest.yml#/ABTests' count: type: integer description: Number of A/B tests found for the app. @@ -76,10 +76,10 @@ get: - count - total '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/abtesting/paths/stopABTest.yml b/specs/abtesting/paths/stopABTest.yml index 4f37b5f9bda..33cc821b9af 100644 --- a/specs/abtesting/paths/stopABTest.yml +++ b/specs/abtesting/paths/stopABTest.yml @@ -8,19 +8,19 @@ post: Associated metadata and metrics are still stored. summary: Marks the A/B test as stopped. parameters: - - $ref: ../common/parameters.yml#/ID + - $ref: '../common/parameters.yml#/ID' responses: '200': description: OK content: application/json: schema: - $ref: ../common/schemas/ABTestResponse.yml#/ABTestResponse + $ref: '../common/schemas/ABTestResponse.yml#/ABTestResponse' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/abtesting/spec.yml b/specs/abtesting/spec.yml index 381a6d0c2ab..e33ea45647e 100644 --- a/specs/abtesting/spec.yml +++ b/specs/abtesting/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: ../common/securitySchemes.yml#/appId + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: ../common/securitySchemes.yml#/apiKey + $ref: '../common/securitySchemes.yml#/apiKey' servers: - url: https://analytics.{region}.algolia.com variables: @@ -29,11 +29,11 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' /2/abtests: - $ref: paths/abtests.yml + $ref: 'paths/abtests.yml' /2/abtests/{id}: - $ref: paths/abtest.yml + $ref: 'paths/abtest.yml' /2/abtests/{id}/stop: - $ref: paths/stopABTest.yml + $ref: 'paths/stopABTest.yml' diff --git a/specs/analytics/common/parameters.yml b/specs/analytics/common/parameters.yml index ec1d3f0c1c0..eeb777a1763 100644 --- a/specs/analytics/common/parameters.yml +++ b/specs/analytics/common/parameters.yml @@ -13,18 +13,26 @@ OrderBy: name: orderBy description: Reorder the results. schema: - type: string - enum: [searchCount, clickThroughRate, conversionRate, averageClickPosition] - default: searchCount + $ref: '#/orderBy' + +# private +orderBy: + type: string + enum: [searchCount, clickThroughRate, conversionRate, averageClickPosition] + default: searchCount Direction: in: query name: direction description: The sorting of the result. schema: - type: string - enum: [asc, desc] - default: asc + $ref: '#/direction' + +# private +direction: + type: string + enum: [asc, desc] + default: asc ClickAnalytics: in: query diff --git a/specs/analytics/common/schemas/getTopFilterAttributes.yml b/specs/analytics/common/schemas/getTopFilterAttributes.yml index 5fbd9527938..87969243eaf 100644 --- a/specs/analytics/common/schemas/getTopFilterAttributes.yml +++ b/specs/analytics/common/schemas/getTopFilterAttributes.yml @@ -18,6 +18,6 @@ getTopFilterAttribute: - count properties: attribute: - $ref: ../parameters.yml#/attribute + $ref: '../parameters.yml#/attribute' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' diff --git a/specs/analytics/common/schemas/getTopFilterForAttribute.yml b/specs/analytics/common/schemas/getTopFilterForAttribute.yml index ff5c1b35717..6e4e1deb5cc 100644 --- a/specs/analytics/common/schemas/getTopFilterForAttribute.yml +++ b/specs/analytics/common/schemas/getTopFilterForAttribute.yml @@ -26,4 +26,4 @@ getTopFilterForAttribute: value: $ref: '../parameters.yml#/value' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' diff --git a/specs/analytics/common/schemas/getTopFiltersNoResults.yml b/specs/analytics/common/schemas/getTopFiltersNoResults.yml index 0485aefc61d..feb83cb4a04 100644 --- a/specs/analytics/common/schemas/getTopFiltersNoResults.yml +++ b/specs/analytics/common/schemas/getTopFiltersNoResults.yml @@ -18,7 +18,7 @@ getTopFiltersNoResultsValues: - count properties: count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' values: type: array description: A list of filters without results. diff --git a/specs/analytics/common/schemas/getTopHits.yml b/specs/analytics/common/schemas/getTopHits.yml index 6214fc1f788..ff0f528759e 100644 --- a/specs/analytics/common/schemas/getTopHits.yml +++ b/specs/analytics/common/schemas/getTopHits.yml @@ -17,7 +17,7 @@ topHitsResponse: hit: $ref: '../parameters.yml#/hit' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' topHitsResponseWithAnalytics: type: object @@ -43,13 +43,13 @@ topHitsResponseWithAnalytics: hit: $ref: '../parameters.yml#/hit' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' clickThroughRate: $ref: '../parameters.yml#/rate' conversionRate: $ref: '../parameters.yml#/conversionRate' trackedSearchCount: - $ref: ../../../common/parameters.yml#/trackedSearchCount + $ref: '../../../common/parameters.yml#/trackedSearchCount' clickCount: $ref: '../parameters.yml#/clickCount' conversionCount: diff --git a/specs/analytics/common/schemas/getTopSearches.yml b/specs/analytics/common/schemas/getTopSearches.yml index 51270f32094..886052ff2fa 100644 --- a/specs/analytics/common/schemas/getTopSearches.yml +++ b/specs/analytics/common/schemas/getTopSearches.yml @@ -16,11 +16,11 @@ topSearchesResponse: - nbHits properties: search: - $ref: ../parameters.yml#/search + $ref: '../parameters.yml#/search' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' nbHits: - $ref: ../../../search/common/schemas/SearchResponse.yml#/nbHits + $ref: '../../../search/common/schemas/SearchResponse.yml#/nbHits' topSearchesResponseWithAnalytics: type: object @@ -48,7 +48,7 @@ topSearchesResponseWithAnalytics: search: $ref: '../parameters.yml#/search' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' clickThroughRate: $ref: '../parameters.yml#/rate' averageClickPosition: @@ -56,13 +56,13 @@ topSearchesResponseWithAnalytics: conversionRate: $ref: '../parameters.yml#/conversionRate' trackedSearchCount: - $ref: ../../../common/parameters.yml#/trackedSearchCount + $ref: '../../../common/parameters.yml#/trackedSearchCount' clickCount: $ref: '../parameters.yml#/clickCount' conversionCount: $ref: '../parameters.yml#/conversionCount' nbHits: - $ref: ../../../search/common/schemas/SearchResponse.yml#/nbHits + $ref: '../../../search/common/schemas/SearchResponse.yml#/nbHits' getTopSearchesResponse: oneOf: diff --git a/specs/analytics/paths/click/getAverageClickPosition.yml b/specs/analytics/paths/click/getAverageClickPosition.yml index dbe7247408d..340719cd406 100644 --- a/specs/analytics/paths/click/getAverageClickPosition.yml +++ b/specs/analytics/paths/click/getAverageClickPosition.yml @@ -43,10 +43,10 @@ get: date: $ref: '../../common/parameters.yml#/date' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/click/getClickPositions.yml b/specs/analytics/paths/click/getClickPositions.yml index 98760de04b6..849be96ce72 100644 --- a/specs/analytics/paths/click/getClickPositions.yml +++ b/specs/analytics/paths/click/getClickPositions.yml @@ -44,10 +44,10 @@ get: clickCount: $ref: '../../common/parameters.yml#/clickCount' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/click/getClickThroughRate.yml b/specs/analytics/paths/click/getClickThroughRate.yml index b141d5250ec..63417ff2b54 100644 --- a/specs/analytics/paths/click/getClickThroughRate.yml +++ b/specs/analytics/paths/click/getClickThroughRate.yml @@ -27,7 +27,7 @@ get: clickCount: $ref: '../../common/parameters.yml#/clickCount' trackedSearchCount: - $ref: ../../../common/parameters.yml#/trackedSearchCount + $ref: '../../../common/parameters.yml#/trackedSearchCount' dates: type: array description: A list of click-through rate events with their date. @@ -45,14 +45,14 @@ get: clickCount: $ref: '../../common/parameters.yml#/clickCount' trackedSearchCount: - $ref: ../../../common/parameters.yml#/trackedSearchCount + $ref: '../../../common/parameters.yml#/trackedSearchCount' date: $ref: '../../common/parameters.yml#/date' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/click/getConversionRate.yml b/specs/analytics/paths/click/getConversionRate.yml index 5f502509552..d00e345e124 100644 --- a/specs/analytics/paths/click/getConversionRate.yml +++ b/specs/analytics/paths/click/getConversionRate.yml @@ -25,7 +25,7 @@ get: rate: $ref: '../../common/parameters.yml#/rate' trackedSearchCount: - $ref: ../../../common/parameters.yml#/trackedSearchCount + $ref: '../../../common/parameters.yml#/trackedSearchCount' conversionCount: $ref: '../../common/parameters.yml#/conversionCount' dates: @@ -43,16 +43,16 @@ get: rate: $ref: '../../common/parameters.yml#/rate' trackedSearchCount: - $ref: ../../../common/parameters.yml#/trackedSearchCount + $ref: '../../../common/parameters.yml#/trackedSearchCount' conversionCount: $ref: '../../common/parameters.yml#/conversionCount' date: $ref: '../../common/parameters.yml#/date' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getNoClickRate.yml b/specs/analytics/paths/search/getNoClickRate.yml index bc6dca7686c..70d47b25067 100644 --- a/specs/analytics/paths/search/getNoClickRate.yml +++ b/specs/analytics/paths/search/getNoClickRate.yml @@ -49,10 +49,10 @@ get: date: $ref: '../../common/parameters.yml#/date' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getNoResultsRate.yml b/specs/analytics/paths/search/getNoResultsRate.yml index 4fc6413b5dd..da99f3a269a 100644 --- a/specs/analytics/paths/search/getNoResultsRate.yml +++ b/specs/analytics/paths/search/getNoResultsRate.yml @@ -25,9 +25,9 @@ get: rate: $ref: '../../common/parameters.yml#/rate' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' noResultCount: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' dates: type: array description: A list of searches without results with their date, rate and counts. @@ -43,16 +43,16 @@ get: date: $ref: '../../common/parameters.yml#/date' noResultCount: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' rate: $ref: '../../common/parameters.yml#/rate' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getSearchesCount.yml b/specs/analytics/paths/search/getSearchesCount.yml index f11e4e909a7..7d7a21afcd4 100644 --- a/specs/analytics/paths/search/getSearchesCount.yml +++ b/specs/analytics/paths/search/getSearchesCount.yml @@ -21,7 +21,7 @@ get: - count properties: count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' dates: type: array description: A list of search events with their date and count. @@ -35,12 +35,12 @@ get: date: $ref: '../../common/parameters.yml#/date' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getSearchesNoClicks.yml b/specs/analytics/paths/search/getSearchesNoClicks.yml index 279cf168ff4..88e9187ed7b 100644 --- a/specs/analytics/paths/search/getSearchesNoClicks.yml +++ b/specs/analytics/paths/search/getSearchesNoClicks.yml @@ -33,16 +33,16 @@ get: - withFilterCount properties: search: - $ref: ../../common/parameters.yml#/search + $ref: '../../common/parameters.yml#/search' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' withFilterCount: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getSearchesNoResults.yml b/specs/analytics/paths/search/getSearchesNoResults.yml index dd97e469614..dfc5cfaa949 100644 --- a/specs/analytics/paths/search/getSearchesNoResults.yml +++ b/specs/analytics/paths/search/getSearchesNoResults.yml @@ -33,16 +33,16 @@ get: - nbHits properties: search: - $ref: ../../common/parameters.yml#/search + $ref: '../../common/parameters.yml#/search' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' nbHits: - $ref: ../../../search/common/schemas/SearchResponse.yml#/nbHits + $ref: '../../../search/common/schemas/SearchResponse.yml#/nbHits' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getTopCountries.yml b/specs/analytics/paths/search/getTopCountries.yml index 733f5b6b740..b5ad701065e 100644 --- a/specs/analytics/paths/search/getTopCountries.yml +++ b/specs/analytics/paths/search/getTopCountries.yml @@ -35,12 +35,12 @@ get: description: The country. type: string count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getTopFilterAttributes.yml b/specs/analytics/paths/search/getTopFilterAttributes.yml index b2176fa2dac..ab9b8b5a7e4 100644 --- a/specs/analytics/paths/search/getTopFilterAttributes.yml +++ b/specs/analytics/paths/search/getTopFilterAttributes.yml @@ -18,10 +18,10 @@ get: schema: $ref: '../../common/schemas/getTopFilterAttributes.yml#/getTopFilterAttributesResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getTopFilterForAttribute.yml b/specs/analytics/paths/search/getTopFilterForAttribute.yml index 49ae665be71..2397fb38bd5 100644 --- a/specs/analytics/paths/search/getTopFilterForAttribute.yml +++ b/specs/analytics/paths/search/getTopFilterForAttribute.yml @@ -19,10 +19,10 @@ get: schema: $ref: '../../common/schemas/getTopFilterForAttribute.yml#/getTopFilterForAttributeResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getTopFiltersNoResults.yml b/specs/analytics/paths/search/getTopFiltersNoResults.yml index 039b94aa3b2..d736501a5f5 100644 --- a/specs/analytics/paths/search/getTopFiltersNoResults.yml +++ b/specs/analytics/paths/search/getTopFiltersNoResults.yml @@ -18,10 +18,10 @@ get: schema: $ref: '../../common/schemas/getTopFiltersNoResults.yml#/getTopFiltersNoResultsResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml index a132b78c778..f6541dbc00a 100644 --- a/specs/analytics/paths/search/getTopHits.yml +++ b/specs/analytics/paths/search/getTopHits.yml @@ -19,10 +19,10 @@ get: schema: $ref: '../../common/schemas/getTopHits.yml#/getTopHitsResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getTopSearches.yml b/specs/analytics/paths/search/getTopSearches.yml index 7f24daf24dd..4ff912fb5b3 100644 --- a/specs/analytics/paths/search/getTopSearches.yml +++ b/specs/analytics/paths/search/getTopSearches.yml @@ -20,10 +20,10 @@ get: schema: $ref: '../../common/schemas/getTopSearches.yml#/getTopSearchesResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/search/getUsersCount.yml b/specs/analytics/paths/search/getUsersCount.yml index f17cf4a1ea7..0b8e97785cb 100644 --- a/specs/analytics/paths/search/getUsersCount.yml +++ b/specs/analytics/paths/search/getUsersCount.yml @@ -21,7 +21,7 @@ get: - count properties: count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' dates: type: array description: A list of users count with their date. @@ -35,12 +35,12 @@ get: date: $ref: '../../common/parameters.yml#/date' count: - $ref: ../../../common/parameters.yml#/count + $ref: '../../../common/parameters.yml#/count' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/paths/status/getStatus.yml b/specs/analytics/paths/status/getStatus.yml index a9df74b216a..efc0f6b8e90 100644 --- a/specs/analytics/paths/status/getStatus.yml +++ b/specs/analytics/paths/status/getStatus.yml @@ -17,12 +17,12 @@ get: - updatedAt properties: updatedAt: - $ref: ../../../common/parameters.yml#/updatedAt + $ref: '../../../common/parameters.yml#/updatedAt' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml index d43a21aa6c7..ed8e3a09de4 100644 --- a/specs/analytics/spec.yml +++ b/specs/analytics/spec.yml @@ -29,50 +29,50 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' # ################################## # ### Search Analytics Endpoints ### # ################################## /2/searches: - $ref: paths/search/getTopSearches.yml + $ref: 'paths/search/getTopSearches.yml' /2/searches/count: - $ref: paths/search/getSearchesCount.yml + $ref: 'paths/search/getSearchesCount.yml' /2/searches/noResults: - $ref: paths/search/getSearchesNoResults.yml + $ref: 'paths/search/getSearchesNoResults.yml' /2/searches/noClicks: - $ref: paths/search/getSearchesNoClicks.yml + $ref: 'paths/search/getSearchesNoClicks.yml' /2/searches/noResultRate: - $ref: paths/search/getNoResultsRate.yml + $ref: 'paths/search/getNoResultsRate.yml' /2/searches/noClickRate: - $ref: paths/search/getNoClickRate.yml + $ref: 'paths/search/getNoClickRate.yml' /2/hits: - $ref: paths/search/getTopHits.yml + $ref: 'paths/search/getTopHits.yml' /2/users/count: - $ref: paths/search/getUsersCount.yml + $ref: 'paths/search/getUsersCount.yml' /2/filters: - $ref: paths/search/getTopFilterAttributes.yml + $ref: 'paths/search/getTopFilterAttributes.yml' /2/filters/{attribute}: - $ref: paths/search/getTopFilterForAttribute.yml + $ref: 'paths/search/getTopFilterForAttribute.yml' /2/filters/noResults: - $ref: paths/search/getTopFiltersNoResults.yml + $ref: 'paths/search/getTopFiltersNoResults.yml' /2/countries: - $ref: paths/search/getTopCountries.yml + $ref: 'paths/search/getTopCountries.yml' # ################################# # ### Click Analytics Endpoints ### # ################################# /2/clicks/averageClickPosition: - $ref: paths/click/getAverageClickPosition.yml + $ref: 'paths/click/getAverageClickPosition.yml' /2/clicks/positions: - $ref: paths/click/getClickPositions.yml + $ref: 'paths/click/getClickPositions.yml' /2/clicks/clickThroughRate: - $ref: paths/click/getClickThroughRate.yml + $ref: 'paths/click/getClickThroughRate.yml' /2/conversions/conversionRate: - $ref: paths/click/getConversionRate.yml + $ref: 'paths/click/getConversionRate.yml' # ######################## # ### Status Endpoints ### # ######################## /2/status: - $ref: paths/status/getStatus.yml + $ref: 'paths/status/getStatus.yml' diff --git a/specs/common/paths/customRequest.yml b/specs/common/paths/customRequest.yml index 68c1dc9a26e..f2f6edd5b58 100644 --- a/specs/common/paths/customRequest.yml +++ b/specs/common/paths/customRequest.yml @@ -1,6 +1,6 @@ get: operationId: get - $ref: ../schemas/CustomRequest.yml#/customRequest + $ref: '../schemas/CustomRequest.yml#/customRequest' post: operationId: post @@ -10,7 +10,7 @@ post: application/json: schema: type: object - $ref: ../schemas/CustomRequest.yml#/customRequest + $ref: '../schemas/CustomRequest.yml#/customRequest' put: operationId: put @@ -20,7 +20,7 @@ put: application/json: schema: type: object - $ref: ../schemas/CustomRequest.yml#/customRequest + $ref: '../schemas/CustomRequest.yml#/customRequest' delete: operationId: del @@ -30,4 +30,4 @@ delete: application/json: schema: type: object - $ref: ../schemas/CustomRequest.yml#/customRequest + $ref: '../schemas/CustomRequest.yml#/customRequest' diff --git a/specs/common/responses/BadRequest.yml b/specs/common/responses/BadRequest.yml index c5834771f7e..967c45cf2b9 100644 --- a/specs/common/responses/BadRequest.yml +++ b/specs/common/responses/BadRequest.yml @@ -2,4 +2,4 @@ description: Bad request or request arguments. content: application/json: schema: - $ref: ../schemas/ErrorBase.yml + $ref: '../schemas/ErrorBase.yml' diff --git a/specs/common/responses/FeatureNotEnabled.yml b/specs/common/responses/FeatureNotEnabled.yml index a3b9dcf2962..e71a76794b2 100644 --- a/specs/common/responses/FeatureNotEnabled.yml +++ b/specs/common/responses/FeatureNotEnabled.yml @@ -2,4 +2,4 @@ description: This feature is not enabled on your Algolia account. content: application/json: schema: - $ref: ../schemas/ErrorBase.yml + $ref: '../schemas/ErrorBase.yml' diff --git a/specs/common/responses/IndexNotFound.yml b/specs/common/responses/IndexNotFound.yml index 9f85d072eb7..8071b9d0868 100644 --- a/specs/common/responses/IndexNotFound.yml +++ b/specs/common/responses/IndexNotFound.yml @@ -2,4 +2,4 @@ description: Index not found. content: application/json: schema: - $ref: ../schemas/ErrorBase.yml + $ref: '../schemas/ErrorBase.yml' diff --git a/specs/common/responses/InternalError.yml b/specs/common/responses/InternalError.yml index 61b49ca2a44..206610f9a77 100644 --- a/specs/common/responses/InternalError.yml +++ b/specs/common/responses/InternalError.yml @@ -2,4 +2,4 @@ description: Internal error. content: application/json: schema: - $ref: ../schemas/ErrorBase.yml + $ref: '../schemas/ErrorBase.yml' diff --git a/specs/common/responses/MethodNotAllowed.yml b/specs/common/responses/MethodNotAllowed.yml index 4ece6110478..2515ad2f0ce 100644 --- a/specs/common/responses/MethodNotAllowed.yml +++ b/specs/common/responses/MethodNotAllowed.yml @@ -2,4 +2,4 @@ description: Method not allowed with this API key. content: application/json: schema: - $ref: ../schemas/ErrorBase.yml + $ref: '../schemas/ErrorBase.yml' diff --git a/specs/common/responses/StatusUnprocessableEntity.yml b/specs/common/responses/StatusUnprocessableEntity.yml index c2e508ff89e..157350c0401 100644 --- a/specs/common/responses/StatusUnprocessableEntity.yml +++ b/specs/common/responses/StatusUnprocessableEntity.yml @@ -2,4 +2,4 @@ description: Status unprocessable entity. content: application/json: schema: - $ref: ../schemas/ErrorBase.yml + $ref: '../schemas/ErrorBase.yml' diff --git a/specs/common/responses/Unauthorized.yml b/specs/common/responses/Unauthorized.yml index 292fe38b4c4..6d0a134ef06 100644 --- a/specs/common/responses/Unauthorized.yml +++ b/specs/common/responses/Unauthorized.yml @@ -2,4 +2,4 @@ description: Unauthorized content: application/json: schema: - $ref: ../schemas/ErrorBase.yml + $ref: '../schemas/ErrorBase.yml' diff --git a/specs/common/schemas/CustomRequest.yml b/specs/common/schemas/CustomRequest.yml index 77413a54cd5..4ef34cef6cd 100644 --- a/specs/common/schemas/CustomRequest.yml +++ b/specs/common/schemas/CustomRequest.yml @@ -15,13 +15,13 @@ Responses: schema: type: object '400': - $ref: ../responses/BadRequest.yml + $ref: '../responses/BadRequest.yml' '402': - $ref: ../responses/FeatureNotEnabled.yml + $ref: '../responses/FeatureNotEnabled.yml' '403': - $ref: ../responses/MethodNotAllowed.yml + $ref: '../responses/MethodNotAllowed.yml' '404': - $ref: ../responses/IndexNotFound.yml + $ref: '../responses/IndexNotFound.yml' PathInPath: name: path diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml index fc6a62157ac..7a5274ae521 100644 --- a/specs/common/schemas/IndexSettings.yml +++ b/specs/common/schemas/IndexSettings.yml @@ -164,10 +164,7 @@ indexSettingsAsSearchParams: description: Minimum number of characters a word in the query string must contain to accept matches with 2 typos. default: 8 typoTolerance: - type: string - enum: [true, false, min, strict] - description: Controls whether typo tolerance is enabled and how it is applied. - default: true + $ref: '#/typoTolerance' allowTyposOnNumericTokens: type: boolean description: Whether to allow typos on numbers ("numeric tokens") in the query string. @@ -213,15 +210,9 @@ indexSettingsAsSearchParams: description: Enable the Personalization feature. default: false queryType: - type: string - enum: [prefixLast, prefixAll, prefixNone] - description: Controls if and how query words are interpreted as prefixes. - default: prefixLast + $ref: '#/queryType' removeWordsIfNoResults: - type: string - enum: [none, lastWords, firstWords, allOptional] - description: Selects a strategy to remove words from the query when it doesn't match any hits. - default: none + $ref: '#/removeWordsIfNoResults' advancedSyntax: type: boolean description: Enables the advanced query syntax. @@ -239,22 +230,17 @@ indexSettingsAsSearchParams: description: List of attributes on which you want to disable the exact ranking criterion. default: [] exactOnSingleWordQuery: - type: string - enum: [attribute, none, word] - description: Controls how the exact ranking criterion is computed when the query contains only one word. - default: attribute + $ref: '#/exactOnSingleWordQuery' alternativesAsExact: type: array items: - type: string - enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym] + $ref: '#/alternativesAsExact' description: List of alternatives that should be considered an exact match by the exact ranking criterion. default: [ignorePlurals, singleWordSynonym] advancedSyntaxFeatures: type: array items: - type: string - enum: [exactPhrase, excludeWords] + $ref: '#/advancedSyntaxFeatures' description: Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled. default: [exactPhrase, excludeWords] distinct: @@ -309,3 +295,35 @@ userData: type: object description: Lets you store custom data in your indices. default: {} + +typoTolerance: + type: string + enum: [true, false, min, strict] + description: Controls whether typo tolerance is enabled and how it is applied. + default: true + +queryType: + type: string + enum: [prefixLast, prefixAll, prefixNone] + description: Controls if and how query words are interpreted as prefixes. + default: prefixLast + +removeWordsIfNoResults: + type: string + enum: [none, lastWords, firstWords, allOptional] + description: Selects a strategy to remove words from the query when it doesn't match any hits. + default: none + +exactOnSingleWordQuery: + type: string + enum: [attribute, none, word] + description: Controls how the exact ranking criterion is computed when the query contains only one word. + default: attribute + +alternativesAsExact: + type: string + enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym] + +advancedSyntaxFeatures: + type: string + enum: [exactPhrase, excludeWords] diff --git a/specs/common/schemas/SearchParams.yml b/specs/common/schemas/SearchParams.yml index 36adff4d767..49d7ead6a11 100644 --- a/specs/common/schemas/SearchParams.yml +++ b/specs/common/schemas/SearchParams.yml @@ -197,5 +197,8 @@ aroundRadius: oneOf: - type: integer minimum: 1 - - type: string - enum: [all] + - $ref: '#/aroundRadiusAll' + +aroundRadiusAll: + type: string + enum: [all] diff --git a/specs/insights/common/enums.yml b/specs/insights/common/enums.yml new file mode 100644 index 00000000000..58858615ec5 --- /dev/null +++ b/specs/insights/common/enums.yml @@ -0,0 +1,4 @@ +eventType: + type: string + description: An eventType can be a click, a conversion, or a view. + enum: [click, conversion, view] diff --git a/specs/insights/paths/pushEvents.yml b/specs/insights/paths/pushEvents.yml index 90b8c96f31f..6638edff9be 100644 --- a/specs/insights/paths/pushEvents.yml +++ b/specs/insights/paths/pushEvents.yml @@ -24,9 +24,7 @@ post: additionalProperties: false properties: eventType: - type: string - description: An eventType can be a click, a conversion, or a view. - enum: [click, conversion, view] + $ref: '../common/enums.yml#/eventType' eventName: type: string description: A user-defined string used to categorize events. @@ -78,10 +76,10 @@ post: type: string description: A message confirming the event push. '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/insights/spec.yml b/specs/insights/spec.yml index 7f856853a4d..f657f3394de 100644 --- a/specs/insights/spec.yml +++ b/specs/insights/spec.yml @@ -29,7 +29,7 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' /1/events: - $ref: paths/pushEvents.yml + $ref: 'paths/pushEvents.yml' diff --git a/specs/personalization/paths/deleteUserProfile.yml b/specs/personalization/paths/deleteUserProfile.yml index a53134d0ea7..beed0e79b85 100644 --- a/specs/personalization/paths/deleteUserProfile.yml +++ b/specs/personalization/paths/deleteUserProfile.yml @@ -23,10 +23,10 @@ delete: type: string description: A date until which the data can safely be considered as deleted for the given user. Any data received after the deletedUntil date will start building a new user profile. '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/personalization/paths/getUserTokenProfile.yml b/specs/personalization/paths/getUserTokenProfile.yml index 1c0a9406e1b..3fa6e63b8fc 100644 --- a/specs/personalization/paths/getUserTokenProfile.yml +++ b/specs/personalization/paths/getUserTokenProfile.yml @@ -27,10 +27,10 @@ get: type: object description: The userToken scores. '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/personalization/paths/personalizationStrategy.yml b/specs/personalization/paths/personalizationStrategy.yml index 63ec4861988..ca93013eb5e 100644 --- a/specs/personalization/paths/personalizationStrategy.yml +++ b/specs/personalization/paths/personalizationStrategy.yml @@ -24,13 +24,13 @@ post: type: string description: A message confirming the strategy update. '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' get: tags: - personalization @@ -45,10 +45,10 @@ get: schema: $ref: '../common/schemas/personalizationStrategy.yml#/personalizationStrategyParams' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/personalization/spec.yml b/specs/personalization/spec.yml index 87d7e8cab72..c08ac0f874f 100644 --- a/specs/personalization/spec.yml +++ b/specs/personalization/spec.yml @@ -28,11 +28,11 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' /1/profiles/personalization/{userToken}: - $ref: paths/getUserTokenProfile.yml + $ref: 'paths/getUserTokenProfile.yml' /1/profiles/{userToken}: - $ref: paths/deleteUserProfile.yml + $ref: 'paths/deleteUserProfile.yml' /1/strategies/personalization: - $ref: paths/personalizationStrategy.yml + $ref: 'paths/personalizationStrategy.yml' diff --git a/specs/predict/common/enums.yml b/specs/predict/common/enums.yml new file mode 100644 index 00000000000..64a846f0fc0 --- /dev/null +++ b/specs/predict/common/enums.yml @@ -0,0 +1,7 @@ +modelsToRetrieve: + type: string + enum: [funnel_stage, order_value, affinities] + +typesToRetrieve: + type: string + enum: [properties, segments] diff --git a/specs/predict/paths/fetchUserProfile.yml b/specs/predict/paths/fetchUserProfile.yml index 6df63ff66fa..99860b3fe38 100644 --- a/specs/predict/paths/fetchUserProfile.yml +++ b/specs/predict/paths/fetchUserProfile.yml @@ -18,19 +18,12 @@ post: type: array description: List with model types for which to retrieve predictions. items: - type: string - enum: - - funnel_stage - - order_value - - affinities + $ref: '../common/enums.yml#/modelsToRetrieve' typesToRetrieve: type: array description: List with types to be retrieved. items: - type: string - enum: - - properties - - segments + $ref: '../common/enums.yml#/typesToRetrieve' minItems: 1 responses: '200': @@ -126,12 +119,12 @@ post: items: type: string '404': - $ref: ../responses/UserNotFound.yml + $ref: '../responses/UserNotFound.yml' '405': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '400': description: ModelsToRetrieve or typesToRetrieve must be set. content: application/json: schema: - $ref: ../../common/schemas/ErrorBase.yml + $ref: '../../common/schemas/ErrorBase.yml' diff --git a/specs/predict/responses/UserNotFound.yml b/specs/predict/responses/UserNotFound.yml index 86630af3f7a..cfc7327e29c 100644 --- a/specs/predict/responses/UserNotFound.yml +++ b/specs/predict/responses/UserNotFound.yml @@ -2,4 +2,4 @@ description: User not found. content: application/json: schema: - $ref: ../../common/schemas/ErrorBase.yml + $ref: '../../common/schemas/ErrorBase.yml' diff --git a/specs/predict/spec.yml b/specs/predict/spec.yml index c96fe4adc8a..b638cec16d0 100644 --- a/specs/predict/spec.yml +++ b/specs/predict/spec.yml @@ -22,7 +22,7 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' /1/users/{userID}/fetch: - $ref: paths/fetchUserProfile.yml + $ref: 'paths/fetchUserProfile.yml' diff --git a/specs/query-suggestions/common/enums.yml b/specs/query-suggestions/common/enums.yml new file mode 100644 index 00000000000..09a635c85de --- /dev/null +++ b/specs/query-suggestions/common/enums.yml @@ -0,0 +1,4 @@ +logLevel: + type: string + enum: [INFO, SKIP, ERROR] + description: type of the record, can be one of three values (INFO, SKIP or ERROR). diff --git a/specs/query-suggestions/common/parameters.yml b/specs/query-suggestions/common/parameters.yml index 884a80458f8..08426027217 100644 --- a/specs/query-suggestions/common/parameters.yml +++ b/specs/query-suggestions/common/parameters.yml @@ -46,7 +46,7 @@ QuerySuggestionsIndexParam: - sourceIndices properties: sourceIndices: - $ref: ../common/parameters.yml#/SourceIndices + $ref: '../common/parameters.yml#/SourceIndices' languages: type: array items: diff --git a/specs/query-suggestions/paths/getConfigurationStatus.yml b/specs/query-suggestions/paths/getConfigurationStatus.yml index 02bcab9b177..e4bda4611ba 100644 --- a/specs/query-suggestions/paths/getConfigurationStatus.yml +++ b/specs/query-suggestions/paths/getConfigurationStatus.yml @@ -6,7 +6,7 @@ get: The status includes whether the Query Suggestions index is currently in the process of being built, and the last build time. summary: Get the status of a Query Suggestion's index. parameters: - - $ref: ../../common/parameters.yml#/IndexName + - $ref: '../../common/parameters.yml#/IndexName' responses: '200': description: OK @@ -32,8 +32,8 @@ get: format: data-time description: Date and time of the last build. '401': - $ref: ../../common/responses/Unauthorized.yml + $ref: '../../common/responses/Unauthorized.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '500': - $ref: ../../common/responses/InternalError.yml + $ref: '../../common/responses/InternalError.yml' diff --git a/specs/query-suggestions/paths/getLogFile.yml b/specs/query-suggestions/paths/getLogFile.yml index 6ff282faf62..a8798f9e27a 100644 --- a/specs/query-suggestions/paths/getLogFile.yml +++ b/specs/query-suggestions/paths/getLogFile.yml @@ -3,7 +3,7 @@ get: description: Get the log file of the last build of a single Query Suggestion index. summary: Get the log file of the last build of a single Query Suggestion index. parameters: - - $ref: ../../common/parameters.yml#/IndexName + - $ref: '../../common/parameters.yml#/IndexName' responses: '200': description: OK @@ -25,9 +25,7 @@ get: type: string description: date and time of creation of the record. level: - type: string - enum: [INFO, SKIP, ERROR] - description: type of the record, can be one of three values (INFO, SKIP or ERROR). + $ref: '../common/enums.yml#/logLevel' message: type: string description: detailed description of what happened. @@ -35,10 +33,10 @@ get: type: integer description: indicates the hierarchy of the records. For example, a record with contextLevel=1 belongs to a preceding record with contextLevel=0. '401': - $ref: ../../common/responses/Unauthorized.yml + $ref: '../../common/responses/Unauthorized.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' '500': - $ref: ../../common/responses/InternalError.yml + $ref: '../../common/responses/InternalError.yml' diff --git a/specs/query-suggestions/paths/qsConfig.yml b/specs/query-suggestions/paths/qsConfig.yml index f4f2fae7747..666768219ac 100644 --- a/specs/query-suggestions/paths/qsConfig.yml +++ b/specs/query-suggestions/paths/qsConfig.yml @@ -3,20 +3,20 @@ put: description: Update the configuration of a Query Suggestions index. summary: Update the configuration of a Query Suggestions index. parameters: - - $ref: ../../common/parameters.yml#/IndexName + - $ref: '../../common/parameters.yml#/IndexName' requestBody: required: true content: application/json: schema: - $ref: ../common/parameters.yml#/QuerySuggestionsIndexParam + $ref: '../common/parameters.yml#/QuerySuggestionsIndexParam' responses: '200': - $ref: ../../common/responses/Success.yml + $ref: '../../common/responses/Success.yml' '401': - $ref: ../../common/responses/Unauthorized.yml + $ref: '../../common/responses/Unauthorized.yml' '500': - $ref: ../../common/responses/InternalError.yml + $ref: '../../common/responses/InternalError.yml' delete: tags: @@ -30,16 +30,16 @@ delete: Note that when doing this, the underlying index does not change - existing suggestions remain untouched. summary: Delete a configuration of a Query Suggestion's index. parameters: - - $ref: ../../common/parameters.yml#/IndexName + - $ref: '../../common/parameters.yml#/IndexName' responses: '200': - $ref: ../../common/responses/Success.yml + $ref: '../../common/responses/Success.yml' '401': - $ref: ../../common/responses/Unauthorized.yml + $ref: '../../common/responses/Unauthorized.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '500': - $ref: ../../common/responses/InternalError.yml + $ref: '../../common/responses/InternalError.yml' get: tags: @@ -48,21 +48,21 @@ get: description: Get the configuration of a single Query Suggestions index. summary: Get the configuration of a single Query Suggestions index. parameters: - - $ref: ../../common/parameters.yml#/IndexName + - $ref: '../../common/parameters.yml#/IndexName' responses: '200': description: OK content: application/json: schema: - $ref: ../common/schemas/QuerySuggestionsIndex.yml#/QuerySuggestionsIndex + $ref: '../common/schemas/QuerySuggestionsIndex.yml#/QuerySuggestionsIndex' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '401': - $ref: ../../common/responses/Unauthorized.yml + $ref: '../../common/responses/Unauthorized.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' '500': - $ref: ../../common/responses/InternalError.yml + $ref: '../../common/responses/InternalError.yml' diff --git a/specs/query-suggestions/paths/qsConfigs.yml b/specs/query-suggestions/paths/qsConfigs.yml index fd71ca3d096..a15bc3125f6 100644 --- a/specs/query-suggestions/paths/qsConfigs.yml +++ b/specs/query-suggestions/paths/qsConfigs.yml @@ -7,20 +7,20 @@ post: content: application/json: schema: - $ref: ../common/parameters.yml#/QuerySuggestionsIndexWithIndexParam + $ref: '../common/parameters.yml#/QuerySuggestionsIndexWithIndexParam' responses: '200': - $ref: ../../common/responses/Success.yml + $ref: '../../common/responses/Success.yml' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '401': - $ref: ../../common/responses/Unauthorized.yml + $ref: '../../common/responses/Unauthorized.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '422': - $ref: ../../common/responses/StatusUnprocessableEntity.yml + $ref: '../../common/responses/StatusUnprocessableEntity.yml' '500': - $ref: ../../common/responses/InternalError.yml + $ref: '../../common/responses/InternalError.yml' get: tags: @@ -39,12 +39,12 @@ get: schema: type: array items: - $ref: ../common/schemas/QuerySuggestionsIndex.yml#/QuerySuggestionsIndex + $ref: '../common/schemas/QuerySuggestionsIndex.yml#/QuerySuggestionsIndex' '401': - $ref: ../../common/responses/Unauthorized.yml + $ref: '../../common/responses/Unauthorized.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '422': - $ref: ../../common/responses/StatusUnprocessableEntity.yml + $ref: '../../common/responses/StatusUnprocessableEntity.yml' '500': - $ref: ../../common/responses/InternalError.yml + $ref: '../../common/responses/InternalError.yml' diff --git a/specs/query-suggestions/spec.yml b/specs/query-suggestions/spec.yml index a221090d43a..bb6e470f0c5 100644 --- a/specs/query-suggestions/spec.yml +++ b/specs/query-suggestions/spec.yml @@ -28,13 +28,13 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' /1/configs: - $ref: paths/qsConfigs.yml + $ref: 'paths/qsConfigs.yml' /1/configs/{indexName}: - $ref: paths/qsConfig.yml + $ref: 'paths/qsConfig.yml' /1/configs/{indexName}/status: - $ref: paths/getConfigurationStatus.yml + $ref: 'paths/getConfigurationStatus.yml' /1/logs/{indexName}: - $ref: paths/getLogFile.yml + $ref: 'paths/getLogFile.yml' diff --git a/specs/recommend/paths/getRecommendations.yml b/specs/recommend/paths/getRecommendations.yml index 66bba548f15..54b39741a74 100644 --- a/specs/recommend/paths/getRecommendations.yml +++ b/specs/recommend/paths/getRecommendations.yml @@ -34,10 +34,10 @@ post: items: $ref: '../common/schemas/RecommendationsResponse.yml#/recommendationsResponse' '400': - $ref: ../../common/responses/BadRequest.yml + $ref: '../../common/responses/BadRequest.yml' '402': - $ref: ../../common/responses/FeatureNotEnabled.yml + $ref: '../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../common/responses/MethodNotAllowed.yml + $ref: '../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../common/responses/IndexNotFound.yml + $ref: '../../common/responses/IndexNotFound.yml' diff --git a/specs/recommend/spec.yml b/specs/recommend/spec.yml index b3514b36e8c..bba609ebfcb 100644 --- a/specs/recommend/spec.yml +++ b/specs/recommend/spec.yml @@ -41,7 +41,7 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' /1/indexes/*/recommendations: - $ref: paths/getRecommendations.yml + $ref: 'paths/getRecommendations.yml' diff --git a/specs/search/common/enums.yml b/specs/search/common/enums.yml index 7c758d4f8d4..71574ed6746 100644 --- a/specs/search/common/enums.yml +++ b/specs/search/common/enums.yml @@ -32,3 +32,7 @@ logType: type: string enum: [all, query, build, error] default: all + +taskStatus: + type: string + enum: [published, notPublished] diff --git a/specs/search/common/schemas/Hit.yml b/specs/search/common/schemas/Hit.yml index 819041769a3..2fbf258e751 100644 --- a/specs/search/common/schemas/Hit.yml +++ b/specs/search/common/schemas/Hit.yml @@ -28,9 +28,7 @@ highlightResult: value: $ref: '#/highlightedValue' matchLevel: - type: string - description: Indicates how well the attribute matched the search query. - enum: [none, partial, full] + $ref: '#/matchLevel' matchedWords: type: array description: List of words from the query that matched the object. @@ -47,9 +45,7 @@ snippetResult: value: $ref: '#/highlightedValue' matchLevel: - type: string - description: Indicates how well the attribute matched the search query. - enum: [none, partial, full] + $ref: '#/matchLevel' rankingInfo: type: object @@ -107,3 +103,8 @@ highlightedValue: type: string description: Markup text with occurrences highlighted. example: George Clooney + +matchLevel: + type: string + description: Indicates how well the attribute matched the search query. + enum: [none, partial, full] diff --git a/specs/search/paths/advanced/getLogs.yml b/specs/search/paths/advanced/getLogs.yml index 3e8971dae78..236f77f4636 100644 --- a/specs/search/paths/advanced/getLogs.yml +++ b/specs/search/paths/advanced/getLogs.yml @@ -26,7 +26,7 @@ get: in: query description: Type of log entries to retrieve. When omitted, all log entries are retrieved. schema: - $ref: ../../common/enums.yml#/logType + $ref: '../../common/enums.yml#/logType' responses: '200': description: OK @@ -114,10 +114,10 @@ get: - nb_api_calls - processing_time_ms '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/advanced/getTask.yml b/specs/search/paths/advanced/getTask.yml index c5640fbad99..fe319219508 100644 --- a/specs/search/paths/advanced/getTask.yml +++ b/specs/search/paths/advanced/getTask.yml @@ -22,15 +22,14 @@ get: additionalProperties: false properties: status: - type: string - enum: [published, notPublished] + $ref: '../../common/enums.yml#/taskStatus' required: - status '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/dictionaries/batchDictionaryEntries.yml b/specs/search/paths/dictionaries/batchDictionaryEntries.yml index 933a78c8158..d2996b11577 100644 --- a/specs/search/paths/dictionaries/batchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/batchDictionaryEntries.yml @@ -37,12 +37,12 @@ post: $ref: 'common/schemas/SearchDictionaryEntriesResponse.yml#/dictionaryEntry' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/dictionaries/dictionarySettings.yml b/specs/search/paths/dictionaries/dictionarySettings.yml index 84d548cf056..178e14b4598 100644 --- a/specs/search/paths/dictionaries/dictionarySettings.yml +++ b/specs/search/paths/dictionaries/dictionarySettings.yml @@ -18,15 +18,15 @@ put: $ref: 'common/parameters.yml#/standardEntries' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' get: operationId: getDictionarySettings @@ -47,10 +47,10 @@ get: disableStandardEntries: $ref: 'common/parameters.yml#/standardEntries' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/dictionaries/getDictionaryLanguages.yml b/specs/search/paths/dictionaries/getDictionaryLanguages.yml index 3999d222c5c..c43cd6357c1 100644 --- a/specs/search/paths/dictionaries/getDictionaryLanguages.yml +++ b/specs/search/paths/dictionaries/getDictionaryLanguages.yml @@ -13,10 +13,10 @@ get: additionalProperties: $ref: 'common/schemas/Languages.yml#/languages' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml index a7dabbef6ea..42e5de16dd9 100644 --- a/specs/search/paths/dictionaries/searchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/searchDictionaryEntries.yml @@ -26,12 +26,12 @@ post: $ref: 'common/parameters.yml#/language' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/keys/key.yml b/specs/search/paths/keys/key.yml index 12c374a3029..b392f2a132e 100644 --- a/specs/search/paths/keys/key.yml +++ b/specs/search/paths/keys/key.yml @@ -28,13 +28,13 @@ put: updatedAt: $ref: '../../../common/parameters.yml#/updatedAt' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' get: operationId: getApiKey @@ -50,13 +50,13 @@ get: schema: $ref: 'common/schemas.yml#/key' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' delete: operationId: deleteApiKey @@ -79,10 +79,10 @@ delete: deletedAt: $ref: '../../../common/parameters.yml#/deletedAt' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/keys/keys.yml b/specs/search/paths/keys/keys.yml index 78dceb80034..1abaea88df4 100644 --- a/specs/search/paths/keys/keys.yml +++ b/specs/search/paths/keys/keys.yml @@ -16,13 +16,13 @@ post: schema: $ref: 'common/schemas.yml#/addApiKeyResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' get: operationId: listApiKeys @@ -46,10 +46,10 @@ get: items: $ref: 'common/schemas.yml#/key' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/keys/restoreApiKey.yml b/specs/search/paths/keys/restoreApiKey.yml index ef49f8dfd32..96aac95b617 100644 --- a/specs/search/paths/keys/restoreApiKey.yml +++ b/specs/search/paths/keys/restoreApiKey.yml @@ -12,10 +12,10 @@ post: schema: $ref: 'common/schemas.yml#/addApiKeyResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/manage_indices/listIndices.yml b/specs/search/paths/manage_indices/listIndices.yml index 62530ac1fda..7db91b407b4 100644 --- a/specs/search/paths/manage_indices/listIndices.yml +++ b/specs/search/paths/manage_indices/listIndices.yml @@ -12,10 +12,10 @@ get: schema: $ref: '../../common/schemas/listIndicesResponse.yml#/listIndicesResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/manage_indices/operationIndex.yml b/specs/search/paths/manage_indices/operationIndex.yml index dc9651b3a08..39b55846656 100644 --- a/specs/search/paths/manage_indices/operationIndex.yml +++ b/specs/search/paths/manage_indices/operationIndex.yml @@ -27,12 +27,12 @@ post: - destination responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 2e92c4b35fd..ca9ff9f19fd 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -31,12 +31,12 @@ post: - users responses: '200': - $ref: ../../../common/responses/CreatedAt.yml + $ref: '../../../common/responses/CreatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index c6278436fcc..714909c6729 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -29,10 +29,10 @@ get: required: - topUsers '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 39b90abcde1..1f7efd1f6a6 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -17,12 +17,12 @@ get: type: boolean responses: '200': - $ref: ../../../common/responses/CreatedAt.yml + $ref: '../../../common/responses/CreatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 395d91fefa7..9c080037468 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -23,10 +23,10 @@ get: required: - topUsers '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 728c4f3c79f..0ac72c3d4a9 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -89,10 +89,10 @@ post: - hitsPerPage - updatedAt '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index b363e0db181..dc5712528e3 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -17,13 +17,13 @@ get: schema: $ref: '../../common/schemas/UserId.yml#/userId' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' delete: operationId: removeUserId @@ -49,10 +49,10 @@ delete: required: - deletedAt '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index a06bae2279c..8d691066865 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -27,15 +27,15 @@ post: - cluster responses: '200': - $ref: ../../../common/responses/CreatedAt.yml + $ref: '../../../common/responses/CreatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' get: operationId: listUserIds @@ -67,10 +67,10 @@ get: required: - userIDs '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index 556392b848c..468efc12e08 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -41,10 +41,10 @@ post: objectIDs: $ref: '../../../common/parameters.yml#/objectIDs' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/clearObjects.yml b/specs/search/paths/objects/clearObjects.yml index 6ead8059aa2..76e8c1d4c67 100644 --- a/specs/search/paths/objects/clearObjects.yml +++ b/specs/search/paths/objects/clearObjects.yml @@ -3,15 +3,15 @@ post: summary: clear all objects from an index. description: Delete an index's content, but leave settings and index-specific API keys untouched. parameters: - - $ref: ../../../common/parameters.yml#/IndexName + - $ref: '../../../common/parameters.yml#/IndexName' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/deleteBy.yml b/specs/search/paths/objects/deleteBy.yml index 697234d89a0..fb7c3da957f 100644 --- a/specs/search/paths/objects/deleteBy.yml +++ b/specs/search/paths/objects/deleteBy.yml @@ -8,7 +8,7 @@ post: It doesn't accept empty filters or a query. parameters: - - $ref: ../../../common/parameters.yml#/IndexName + - $ref: '../../../common/parameters.yml#/IndexName' requestBody: required: true content: @@ -17,12 +17,12 @@ post: $ref: '../../../common/schemas/SearchParams.yml#/searchParams' responses: '200': - $ref: ../../../common/responses/DeletedAt.yml + $ref: '../../../common/responses/DeletedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index 49a83d76e0d..5dcdc217aea 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -41,12 +41,12 @@ post: type: object description: List of tasksIDs per index. objectIDs: - $ref: ../../../common/parameters.yml#/objectIDs + $ref: '../../../common/parameters.yml#/objectIDs' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/multipleGetObjects.yml b/specs/search/paths/objects/multipleGetObjects.yml index 254572c752c..8454937200e 100644 --- a/specs/search/paths/objects/multipleGetObjects.yml +++ b/specs/search/paths/objects/multipleGetObjects.yml @@ -52,10 +52,10 @@ post: type: object description: Fetched object. '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml index 3432c2c470f..7c63beff25c 100644 --- a/specs/search/paths/objects/object.yml +++ b/specs/search/paths/objects/object.yml @@ -14,23 +14,23 @@ put: type: object responses: '200': - $ref: ../../../common/responses/UpdatedAtWithObjectId.yml + $ref: '../../../common/responses/UpdatedAtWithObjectId.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' get: operationId: getObject summary: Retrieve one object from the index. description: Retrieve one object from the index. parameters: - - $ref: ../../../common/parameters.yml#/IndexName - - $ref: ../../../common/parameters.yml#/ObjectID + - $ref: '../../../common/parameters.yml#/IndexName' + - $ref: '../../../common/parameters.yml#/ObjectID' - name: attributesToRetrieve in: query description: List of attributes to retrieve. If not specified, all retrievable attributes are returned. @@ -50,13 +50,13 @@ get: additionalProperties: $ref: 'common/schemas.yml#/attribute' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' delete: operationId: deleteObject @@ -67,12 +67,12 @@ delete: - $ref: '../../../common/parameters.yml#/ObjectID' responses: '200': - $ref: ../../../common/responses/DeletedAt.yml + $ref: '../../../common/responses/DeletedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/objects.yml b/specs/search/paths/objects/objects.yml index 5a4e39a208c..38c3d589804 100644 --- a/specs/search/paths/objects/objects.yml +++ b/specs/search/paths/objects/objects.yml @@ -28,13 +28,13 @@ post: objectID: $ref: '../../../common/parameters.yml#/objectID' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' delete: operationId: deleteIndex @@ -44,12 +44,12 @@ delete: - $ref: '../../../common/parameters.yml#/IndexName' responses: '200': - $ref: ../../../common/responses/DeletedAt.yml + $ref: '../../../common/responses/DeletedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/objects/partialUpdate.yml b/specs/search/paths/objects/partialUpdate.yml index 26aef3a52c4..894eba3ecc3 100644 --- a/specs/search/paths/objects/partialUpdate.yml +++ b/specs/search/paths/objects/partialUpdate.yml @@ -10,8 +10,8 @@ post: If the index targeted by this operation doesn't exist yet, it's automatically created. parameters: - - $ref: ../../../common/parameters.yml#/IndexName - - $ref: ../../../common/parameters.yml#/ObjectID + - $ref: '../../../common/parameters.yml#/IndexName' + - $ref: '../../../common/parameters.yml#/ObjectID' - name: createIfNotExists description: Creates the record if it does not exist yet. in: query @@ -33,12 +33,12 @@ post: $ref: 'common/schemas.yml#/attributeOrBuiltInOperation' responses: '200': - $ref: ../../../common/responses/UpdatedAtWithObjectId.yml + $ref: '../../../common/responses/UpdatedAtWithObjectId.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/rules/batchRules.yml b/specs/search/paths/rules/batchRules.yml index 1d15508ffd2..745d530b0aa 100644 --- a/specs/search/paths/rules/batchRules.yml +++ b/specs/search/paths/rules/batchRules.yml @@ -17,12 +17,12 @@ post: $ref: 'common/schemas.yml#/rule' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/rules/clearRules.yml b/specs/search/paths/rules/clearRules.yml index 645db04bd8f..a4cf9236c15 100644 --- a/specs/search/paths/rules/clearRules.yml +++ b/specs/search/paths/rules/clearRules.yml @@ -7,12 +7,12 @@ post: - $ref: '../../../common/parameters.yml#/ForwardToReplicas' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/rules/rule.yml b/specs/search/paths/rules/rule.yml index 6b8eba5bfba..222ac885673 100644 --- a/specs/search/paths/rules/rule.yml +++ b/specs/search/paths/rules/rule.yml @@ -20,13 +20,13 @@ put: schema: $ref: 'common/schemas.yml#/updatedRuleResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' get: operationId: getRule @@ -43,13 +43,13 @@ get: schema: $ref: 'common/schemas.yml#/rule' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' delete: operationId: deleteRule @@ -61,12 +61,12 @@ delete: - $ref: '../../../common/parameters.yml#/ForwardToReplicas' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/rules/searchRules.yml b/specs/search/paths/rules/searchRules.yml index 687e32e9117..b73afdd4d8f 100644 --- a/specs/search/paths/rules/searchRules.yml +++ b/specs/search/paths/rules/searchRules.yml @@ -65,10 +65,10 @@ post: type: integer description: Number of pages. '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/search/browse.yml b/specs/search/paths/search/browse.yml index 6ee3de243c5..d195fcacedc 100644 --- a/specs/search/paths/search/browse.yml +++ b/specs/search/paths/search/browse.yml @@ -29,10 +29,10 @@ post: schema: $ref: '../../common/schemas/SearchResponse.yml#/browseResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml index 887a3bc3e3b..48110afc662 100644 --- a/specs/search/paths/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -52,10 +52,10 @@ post: items: $ref: '../../common/schemas/SearchResponse.yml#/searchResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index 23923f35e95..dbc13f2183f 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -18,10 +18,10 @@ post: schema: $ref: '../../common/schemas/SearchResponse.yml#/searchResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml index bfb403b1cfb..77d248444c8 100644 --- a/specs/search/paths/search/searchForFacetValues.yml +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -57,10 +57,10 @@ post: description: How many objects contain this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the counts may not be exhaustive. type: integer '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml index db6b51342b9..da042084929 100644 --- a/specs/search/paths/settings/settings.yml +++ b/specs/search/paths/settings/settings.yml @@ -12,13 +12,13 @@ get: schema: $ref: '../../../common/schemas/IndexSettings.yml#/indexSettings' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' put: operationId: setSettings @@ -35,12 +35,12 @@ put: $ref: '../../../common/schemas/IndexSettings.yml#/indexSettings' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/synonyms/batchSynonyms.yml b/specs/search/paths/synonyms/batchSynonyms.yml index 53769d52fd5..02fa79cd8d8 100644 --- a/specs/search/paths/synonyms/batchSynonyms.yml +++ b/specs/search/paths/synonyms/batchSynonyms.yml @@ -14,12 +14,12 @@ post: $ref: 'common/schemas.yml#/synonymHits' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/synonyms/clearAllSynonyms.yml b/specs/search/paths/synonyms/clearAllSynonyms.yml index 4f78030b209..116b572018c 100644 --- a/specs/search/paths/synonyms/clearAllSynonyms.yml +++ b/specs/search/paths/synonyms/clearAllSynonyms.yml @@ -7,12 +7,12 @@ post: - $ref: '../../../common/parameters.yml#/ForwardToReplicas' responses: '200': - $ref: ../../../common/responses/UpdatedAt.yml + $ref: '../../../common/responses/UpdatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml index 2cc5f7f756f..0fe4bd8faa5 100644 --- a/specs/search/paths/synonyms/searchSynonyms.yml +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -16,10 +16,10 @@ post: schema: $ref: 'common/schemas.yml#/searchSynonymsResponse' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/synonyms/synonym.yml b/specs/search/paths/synonyms/synonym.yml index 14000ed9e68..a4cbb77812a 100644 --- a/specs/search/paths/synonyms/synonym.yml +++ b/specs/search/paths/synonyms/synonym.yml @@ -33,13 +33,13 @@ put: - updatedAt - id '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' get: operationId: getSynonym @@ -56,13 +56,13 @@ get: schema: $ref: 'common/schemas.yml#/synonymHit' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' delete: operationId: deleteSynonym @@ -74,12 +74,12 @@ delete: - $ref: '../../../common/parameters.yml#/ForwardToReplicas' responses: '200': - $ref: ../../../common/responses/DeletedAt.yml + $ref: '../../../common/responses/DeletedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/vault/appendSource.yml b/specs/search/paths/vault/appendSource.yml index 4113335eb55..bb1145ddf7c 100644 --- a/specs/search/paths/vault/appendSource.yml +++ b/specs/search/paths/vault/appendSource.yml @@ -11,12 +11,12 @@ post: $ref: 'common/schemas.yml#/source' responses: '200': - $ref: ../../../common/responses/CreatedAt.yml + $ref: '../../../common/responses/CreatedAt.yml' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/vault/deleteSource.yml b/specs/search/paths/vault/deleteSource.yml index 6c455c8f655..345b4ddecdd 100644 --- a/specs/search/paths/vault/deleteSource.yml +++ b/specs/search/paths/vault/deleteSource.yml @@ -25,10 +25,10 @@ delete: deletedAt: $ref: '../../../common/parameters.yml#/deletedAt' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/paths/vault/vaultSources.yml b/specs/search/paths/vault/vaultSources.yml index 2dba28ad34d..2604bd6a553 100644 --- a/specs/search/paths/vault/vaultSources.yml +++ b/specs/search/paths/vault/vaultSources.yml @@ -10,13 +10,13 @@ get: schema: $ref: 'common/schemas.yml#/sources' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' put: tags: @@ -46,10 +46,10 @@ put: updatedAt: $ref: '../../../common/parameters.yml#/updatedAt' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' '402': - $ref: ../../../common/responses/FeatureNotEnabled.yml + $ref: '../../../common/responses/FeatureNotEnabled.yml' '403': - $ref: ../../../common/responses/MethodNotAllowed.yml + $ref: '../../../common/responses/MethodNotAllowed.yml' '404': - $ref: ../../../common/responses/IndexNotFound.yml + $ref: '../../../common/responses/IndexNotFound.yml' diff --git a/specs/search/spec.yml b/specs/search/spec.yml index ef6f108477a..d5b3b93a6c2 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: ../common/securitySchemes.yml#/appId + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: ../common/securitySchemes.yml#/apiKey + $ref: '../common/securitySchemes.yml#/apiKey' servers: - url: https://{appId}.algolianet.com variables: @@ -41,132 +41,132 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' # ######################## # ### Search Endpoints ### # ######################## /1/indexes/{indexName}/query: - $ref: paths/search/search.yml + $ref: 'paths/search/search.yml' /1/indexes/*/queries: - $ref: paths/search/multipleQueries.yml + $ref: 'paths/search/multipleQueries.yml' /1/indexes/{indexName}/facets/{facetName}/query: - $ref: paths/search/searchForFacetValues.yml + $ref: 'paths/search/searchForFacetValues.yml' /1/indexes/{indexName}/browse: - $ref: paths/search/browse.yml + $ref: 'paths/search/browse.yml' # ######################### # ### Objects Endpoints ### # ######################### /1/indexes/{indexName}: - $ref: paths/objects/objects.yml + $ref: 'paths/objects/objects.yml' /1/indexes/{indexName}/{objectID}: - $ref: paths/objects/object.yml + $ref: 'paths/objects/object.yml' /1/indexes/{indexName}/deleteByQuery: - $ref: paths/objects/deleteBy.yml + $ref: 'paths/objects/deleteBy.yml' /1/indexes/{indexName}/clear: - $ref: paths/objects/clearObjects.yml + $ref: 'paths/objects/clearObjects.yml' /1/indexes/{indexName}/{objectID}/partial: - $ref: paths/objects/partialUpdate.yml + $ref: 'paths/objects/partialUpdate.yml' /1/indexes/{indexName}/batch: - $ref: paths/objects/batch.yml + $ref: 'paths/objects/batch.yml' /1/indexes/*/batch: - $ref: paths/objects/multipleBatch.yml + $ref: 'paths/objects/multipleBatch.yml' /1/indexes/*/objects: - $ref: paths/objects/multipleGetObjects.yml + $ref: 'paths/objects/multipleGetObjects.yml' # ########################## # ### Settings Endpoints ### # ########################## /1/indexes/{indexName}/settings: - $ref: paths/settings/settings.yml + $ref: 'paths/settings/settings.yml' # ########################## # ### Synonyms Endpoints ### # ########################## /1/indexes/{indexName}/synonyms/{objectID}: - $ref: paths/synonyms/synonym.yml + $ref: 'paths/synonyms/synonym.yml' /1/indexes/{indexName}/synonyms/batch: - $ref: paths/synonyms/batchSynonyms.yml + $ref: 'paths/synonyms/batchSynonyms.yml' /1/indexes/{indexName}/synonyms/clear: - $ref: paths/synonyms/clearAllSynonyms.yml + $ref: 'paths/synonyms/clearAllSynonyms.yml' /1/indexes/{indexName}/synonyms/search: - $ref: paths/synonyms/searchSynonyms.yml + $ref: 'paths/synonyms/searchSynonyms.yml' # ###################### # ### Keys Endpoints ### # ###################### /1/keys: - $ref: paths/keys/keys.yml + $ref: 'paths/keys/keys.yml' /1/keys/{key}: - $ref: paths/keys/key.yml + $ref: 'paths/keys/key.yml' /1/keys/{key}/restore: - $ref: paths/keys/restoreApiKey.yml + $ref: 'paths/keys/restoreApiKey.yml' # ####################### # ### Rules Endpoints ### # ####################### /1/indexes/{indexName}/rules/{objectID}: - $ref: paths/rules/rule.yml + $ref: 'paths/rules/rule.yml' /1/indexes/{indexName}/rules/batch: - $ref: paths/rules/batchRules.yml + $ref: 'paths/rules/batchRules.yml' /1/indexes/{indexName}/rules/clear: - $ref: paths/rules/clearRules.yml + $ref: 'paths/rules/clearRules.yml' /1/indexes/{indexName}/rules/search: - $ref: paths/rules/searchRules.yml + $ref: 'paths/rules/searchRules.yml' # ############################## # ### Dictionaries Endpoints ### # ############################## /1/dictionaries/{dictionaryName}/batch: - $ref: paths/dictionaries/batchDictionaryEntries.yml + $ref: 'paths/dictionaries/batchDictionaryEntries.yml' /1/dictionaries/{dictionaryName}/search: - $ref: paths/dictionaries/searchDictionaryEntries.yml + $ref: 'paths/dictionaries/searchDictionaryEntries.yml' /1/dictionaries/*/settings: - $ref: paths/dictionaries/dictionarySettings.yml + $ref: 'paths/dictionaries/dictionarySettings.yml' /1/dictionaries/*/languages: - $ref: paths/dictionaries/getDictionaryLanguages.yml + $ref: 'paths/dictionaries/getDictionaryLanguages.yml' # ############################### # ### MultiClusters Endpoints ### # ############################### /1/clusters/mapping: - $ref: paths/multiclusters/userIds.yml + $ref: 'paths/multiclusters/userIds.yml' /1/clusters/mapping/batch: - $ref: paths/multiclusters/batchAssignUserIds.yml + $ref: 'paths/multiclusters/batchAssignUserIds.yml' /1/clusters/mapping/top: - $ref: paths/multiclusters/getTopUserIds.yml + $ref: 'paths/multiclusters/getTopUserIds.yml' /1/clusters/mapping/{userID}: - $ref: paths/multiclusters/userId.yml + $ref: 'paths/multiclusters/userId.yml' /1/clusters: - $ref: paths/multiclusters/listClusters.yml + $ref: 'paths/multiclusters/listClusters.yml' /1/clusters/mapping/search: - $ref: paths/multiclusters/searchUserIds.yml + $ref: 'paths/multiclusters/searchUserIds.yml' /1/clusters/mapping/pending: - $ref: paths/multiclusters/hasPendingMappings.yml + $ref: 'paths/multiclusters/hasPendingMappings.yml' # ####################### # ### Vault Endpoints ### # ####################### /1/security/sources: - $ref: paths/vault/vaultSources.yml + $ref: 'paths/vault/vaultSources.yml' /1/security/sources/append: - $ref: paths/vault/appendSource.yml + $ref: 'paths/vault/appendSource.yml' /1/security/sources/{source}: - $ref: paths/vault/deleteSource.yml + $ref: 'paths/vault/deleteSource.yml' # ########################## # ### Advanced Endpoints ### # ########################## /1/logs: - $ref: paths/advanced/getLogs.yml + $ref: 'paths/advanced/getLogs.yml' /1/indexes/{indexName}/task/{taskID}: - $ref: paths/advanced/getTask.yml + $ref: 'paths/advanced/getTask.yml' # ################################ # ### Manage Indices Endpoints ### # ################################ /1/indexes/{indexName}/operation: - $ref: paths/manage_indices/operationIndex.yml + $ref: 'paths/manage_indices/operationIndex.yml' /1/indexes: - $ref: paths/manage_indices/listIndices.yml + $ref: 'paths/manage_indices/listIndices.yml' diff --git a/specs/sources/common/enums.yml b/specs/sources/common/enums.yml new file mode 100644 index 00000000000..7c79ee3ebe5 --- /dev/null +++ b/specs/sources/common/enums.yml @@ -0,0 +1,20 @@ +method: + type: string + description: The HTTP method that will be used to fetch the URL. + default: GET + enum: [GET, POST] + +authenticationType: + type: string + description: The type of authentication to use. + enum: [basic] + +productType: + type: string + description: The product to target. + enum: [search] + +operationType: + type: string + description: The type of operation to execute. + enum: [replace] diff --git a/specs/sources/common/schemas/Task.yml b/specs/sources/common/schemas/Task.yml index 91bd903998e..a8c927637bd 100644 --- a/specs/sources/common/schemas/Task.yml +++ b/specs/sources/common/schemas/Task.yml @@ -8,10 +8,12 @@ task: format: uuid example: e0f6db8a-24f5-4092-83a4-1b2c6cb6d809 type: - type: string - description: The type of the task executed. - enum: - - csv + $ref: '#/taskType' required: - id - type + +taskType: + type: string + description: The type of the task executed. + enum: [csv] diff --git a/specs/sources/paths/ingest/postUrl.yml b/specs/sources/paths/ingest/postUrl.yml index 542689a8771..e87d37a362d 100644 --- a/specs/sources/paths/ingest/postUrl.yml +++ b/specs/sources/paths/ingest/postUrl.yml @@ -17,10 +17,7 @@ post: - target properties: type: - type: string - description: The type of the file to ingest. - enum: - - csv + $ref: '../../common/schemas/Task.yml#/taskType' uniqueIDColumn: type: string description: The name of the column that hold the unique identifier. @@ -37,12 +34,7 @@ post: type: string description: The URL of the file to ingest. method: - type: string - description: The HTTP method that will be used to fetch the URL. - default: GET - enum: - - GET - - POST + $ref: '../../common/enums.yml#/method' auth: type: object title: postURLJobAuth @@ -54,10 +46,7 @@ post: - password properties: type: - type: string - description: The type of authentication to use. - enum: - - basic + $ref: '../../common/enums.yml#/authenticationType' login: type: string description: The login to use for Basic Auth. @@ -77,19 +66,13 @@ post: - operation properties: type: - type: string - description: The product to target. - enum: - - search + $ref: '../../common/enums.yml#/productType' indexName: type: string description: The index name of the product. example: my_index_name operation: - type: string - description: The type of operation to execute. - enum: - - replace + $ref: '../../common/enums.yml#/operationType' responses: '200': description: OK @@ -103,6 +86,6 @@ post: - task properties: task: - $ref: ../../common/schemas/Task.yml#/task + $ref: '../../common/schemas/Task.yml#/task' '400': - $ref: ../../../common/responses/BadRequest.yml + $ref: '../../../common/responses/BadRequest.yml' diff --git a/specs/sources/spec.yml b/specs/sources/spec.yml index 53a4e27304c..cdd3fbb06be 100644 --- a/specs/sources/spec.yml +++ b/specs/sources/spec.yml @@ -6,9 +6,9 @@ info: components: securitySchemes: appId: - $ref: ../common/securitySchemes.yml#/appId + $ref: '../common/securitySchemes.yml#/appId' apiKey: - $ref: ../common/securitySchemes.yml#/apiKey + $ref: '../common/securitySchemes.yml#/apiKey' servers: - url: https://data.{region}.algolia.com variables: @@ -28,7 +28,7 @@ paths: # ### Custom request ### # ###################### /1{path}: - $ref: ../common/paths/customRequest.yml + $ref: '../common/paths/customRequest.yml' /1/ingest/url: - $ref: paths/ingest/postUrl.yml + $ref: 'paths/ingest/postUrl.yml'