From df62722ad9e04d41c0fe1c08d03aa9153d2254ae Mon Sep 17 00:00:00 2001 From: algolia-ci Date: Tue, 24 Sep 2024 00:15:39 +0000 Subject: [PATCH] chore: update search api specs --- api/specs/search.yml | 760 +++++++++++++++++++++++++------------- pkg/cmdutil/spec_flags.go | 12 +- 2 files changed, 499 insertions(+), 273 deletions(-) diff --git a/api/specs/search.yml b/api/specs/search.yml index 38a0e382..0dae700c 100644 --- a/api/specs/search.yml +++ b/api/specs/search.yml @@ -650,7 +650,7 @@ paths: To update _some_ attributes of a record, use the [`partial` - operation](#tag/Records/operation/partial). + operation](#tag/Records/operation/partialUpdateObject). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch). @@ -777,11 +777,8 @@ paths: content: application/json: schema: - title: getObjectResponse type: object description: The requested record. - additionalProperties: - $ref: '#/components/schemas/attribute' '400': $ref: '#/components/responses/BadRequest' '402': @@ -878,7 +875,7 @@ paths: operation](#tag/Search/operation/browse), and then delete the records using the [`batch` - operation](tag/Records/operation/batch). + operation](#tag/Records/operation/batch). parameters: - $ref: '#/components/parameters/IndexName' requestBody: @@ -931,14 +928,59 @@ paths: - addObject summary: Add or update attributes x-codegen-request-body-name: attributesToUpdate - description: | + description: > Adds new attributes to a record, or update existing ones. + - If a record with the specified object ID doesn't exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn't exist yet, this method creates a new index. + - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. + + To update an attribute without pushing the entire record, you can use + these built-in operations. These operations can be helpful if you don't + have access to your initial data. + + + - Increment: increment a numeric attribute + + - Decrement: decrement a numeric attribute + + - Add: append a number or string element to an array attribute + + - Remove: remove all matching number or string elements from an array + attribute made of numbers or strings + + - AddUnique: add a number or string element to an array attribute made + of numbers or strings only if it's not already present + + - IncrementFrom: increment a numeric integer attribute only if the + provided value matches the current value, and otherwise ignore the whole + object update. For example, if you pass an IncrementFrom value of 2 for + the version attribute, but the current value of the attribute is 1, the + engine ignores the update. If the object doesn't exist, the engine only + creates it if you pass an IncrementFrom value of 0. + + - IncrementSet: increment a numeric integer attribute only if the + provided value is greater than the current value, and otherwise ignore + the whole object update. For example, if you pass an IncrementSet value + of 2 for the version attribute, and the current value of the attribute + is 1, the engine updates the object. If the object doesn't exist yet, + the engine only creates it if you pass an IncrementSet value that's + greater than 0. + + + You can specify an operation by providing an object with the attribute + to update as the key and its value being an object with the following + properties: + + + - _operation: the operation to apply on the attribute + + - value: the right-hand side argument to the operation, for example, + increment or decrement step, value to add or remove. parameters: - $ref: '#/components/parameters/IndexName' - $ref: '#/components/parameters/ObjectID' @@ -954,10 +996,8 @@ paths: content: application/json: schema: - type: object description: Attributes to update. - additionalProperties: - $ref: '#/components/schemas/attributeToUpdate' + type: object responses: '200': $ref: '#/components/responses/UpdatedAtWithObjectId' @@ -989,52 +1029,13 @@ paths: name. parameters: - $ref: '#/components/parameters/IndexName' + x-codegen-request-body-name: batchWriteParams requestBody: - required: true content: application/json: schema: - title: batchWriteParams - description: Batch parameters. - type: object - additionalProperties: false - properties: - requests: - type: array - items: - title: batchRequest - type: object - additionalProperties: false - properties: - action: - $ref: '#/components/schemas/action' - body: - type: object - description: Operation arguments (varies with specified `action`). - example: - name: Betty Jane McCamey - company: Vita Foods Inc. - email: betty@mccamey.com - required: - - action - - body - required: - - requests - examples: - batch: - summary: Batch indexing request - value: - requests: - - action: addObject - body: - name: Betty Jane McCamey - company: Vita Foods Inc. - email: betty@mccamey.com - - action: addObject - body: - name: Gayla geimer - company: Ortman McCain Co. - email: gayla@geimer.com + $ref: '#/components/schemas/batchWriteParams' + required: true responses: '200': description: OK @@ -1091,7 +1092,6 @@ paths: $ref: '#/components/schemas/indexName' required: - action - - body - indexName required: - requests @@ -1168,8 +1168,8 @@ paths: requests: type: array items: - description: Request body for retrieving records. title: getObjectsRequest + description: Request body for retrieving records. type: object additionalProperties: false required: @@ -1243,7 +1243,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/indexSettings' + $ref: '#/components/schemas/settingsResponse' '400': $ref: '#/components/responses/BadRequest' '402': @@ -1887,8 +1887,8 @@ paths: content: application/json: schema: - type: object title: searchRulesParams + type: object description: Rules search parameters. additionalProperties: false properties: @@ -2911,8 +2911,8 @@ paths: type: array description: Queries performed for the given request. items: - type: object title: logQuery + type: object properties: index_name: type: string @@ -2971,14 +2971,7 @@ paths: content: application/json: schema: - title: getTaskResponse - type: object - additionalProperties: false - properties: - status: - $ref: '#/components/schemas/taskStatus' - required: - - status + $ref: '#/components/schemas/GetTaskResponse' '400': $ref: '#/components/responses/BadRequest' '402': @@ -3023,14 +3016,7 @@ paths: content: application/json: schema: - title: getTaskResponse - type: object - additionalProperties: false - properties: - status: - $ref: '#/components/schemas/taskStatus' - required: - - status + $ref: '#/components/schemas/GetTaskResponse' '400': $ref: '#/components/responses/BadRequest' '402': @@ -3203,6 +3189,106 @@ paths: $ref: '#/components/schemas/getApiKeyResponse' '400': $ref: '#/components/responses/IndexNotFound' + /waitForTask: + get: + x-helper: true + tags: + - search + operationId: waitForTask + summary: Wait for operation to complete + description: > + Wait for a task to complete to ensure synchronized index updates. + + + All Algolia write operations are asynchronous. When you make a request + for a write operation, for example, to add or update records in your + index, Algolia creates a task on a queue and returns a taskID. The task + itself runs separately, depending on the server load. + parameters: + - in: query + name: indexName + description: The name of the index on which the operation was performed. + required: true + schema: + type: string + - in: query + name: taskID + description: The taskID returned by the operation. + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetTaskResponse' + '400': + $ref: '#/components/responses/IndexNotFound' + /waitForAppTask: + get: + x-helper: true + operationId: waitForAppTask + summary: Wait for application-level operation to complete + description: Wait for a application-level task to complete. + parameters: + - in: query + name: taskID + description: The taskID returned by the operation. + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetTaskResponse' + '400': + $ref: '#/components/responses/IndexNotFound' + tags: + - search + /browseObjects: + get: + x-helper: true + tags: + - search + operationId: browseObjects + summary: Get all records from an index + description: > + You can use the browse method to get records from an index—for example, + to export your index as a backup. To export all records, use an empty + query. + + + Use browse instead of search when exporting records from your index, + when ranking, or analytics, isn't important. The Analytics API doesn't + collect data when using browse. + + + Don't use this method for building a search UI. Use search instead. + parameters: + - in: query + name: indexName + description: The name of the index on which the operation was performed. + required: true + schema: + type: string + - in: query + name: browseParams + description: Browse parameters. + required: true + schema: + $ref: '#/components/schemas/browseParamsObject' + responses: + '204': + description: No content. + '400': + $ref: '#/components/responses/IndexNotFound' /generateSecuredApiKey: get: x-helper: true @@ -3534,6 +3620,53 @@ paths: $ref: '#/components/schemas/batchResponse' '400': $ref: '#/components/responses/IndexNotFound' + /indexExists: + get: + x-helper: true + tags: + - search + operationId: indexExists + summary: Check if an index exists or not + description: > + You can initialize an index with any name. The index is created on + Algolia's servers when you add objects or set settings. To prevent + accidentally creating new indices, or changing existing indices, you can + use the exists method. The exists method returns a boolean that + indicates whether an initialized index has been created. + parameters: + - in: query + name: indexName + description: The name of the index to check. + required: true + schema: + type: string + responses: + '200': + description: Index exists. + content: + application/json: + schema: + type: boolean + /setClientApiKey: + get: + x-helper: true + x-asynchronous-helper: false + tags: + - search + operationId: setClientApiKey + summary: Switch the API key used to authenticate requests + description: | + Switch the API key used to authenticate requests. + parameters: + - in: query + name: apiKey + description: API key to be used from now on. + required: true + schema: + type: string + responses: + '204': + description: No content. components: securitySchemes: appId: @@ -3551,130 +3684,19 @@ components: Permissions are controlled through access control lists (ACL) and access restrictions. - The required ACL to make a request is listed in each endpoint's - reference. - parameters: - PathInPath: - name: path - in: path - description: Path of the endpoint, anything after "/1" must be specified. - required: true - schema: - type: string - example: /keys - Parameters: - name: parameters - in: query - description: Query parameters to apply to the current query. - schema: - type: object - additionalProperties: true - IndexName: - name: indexName - in: path - description: Name of the index on which to perform the operation. - required: true - schema: - type: string - example: YourIndexName - ObjectID: - name: objectID - in: path - description: Unique record identifier. - required: true - schema: - $ref: '#/components/schemas/objectID' - ForwardToReplicas: - in: query - name: forwardToReplicas - required: false - description: Whether changes are applied to replica indices. - schema: - type: boolean - parameters_ObjectID: - name: objectID - in: path - description: Unique identifier of a synonym object. - required: true - schema: - type: string - example: synonymID - ReplaceExistingSynonyms: - in: query - name: replaceExistingSynonyms - schema: - type: boolean - description: >- - Whether to replace all synonyms in the index with the ones sent with - this request. - KeyString: - in: path - name: key - required: true - schema: - type: string - example: YourAPIKey - description: API key. - ObjectIDRule: - in: path - name: objectID - description: Unique identifier of a rule object. - required: true - schema: - $ref: '#/components/schemas/ruleID' - ClearExistingRules: - in: query - name: clearExistingRules - required: false - schema: - type: boolean - description: Whether existing rules should be deleted before adding this batch. - DictionaryName: - in: path - name: dictionaryName - description: Dictionary type in which to search. - required: true - schema: - $ref: '#/components/schemas/dictionaryType' - Page: - in: query - name: page - description: | - Requested page of the API response. - If `null`, the API response is not paginated. - required: false - schema: - oneOf: - - type: integer - minimum: 0 - - type: 'null' - default: null - HitsPerPage: - in: query - name: hitsPerPage - description: Number of hits per page. - required: false - schema: - type: integer - default: 100 - UserIDInHeader: - name: X-Algolia-User-ID - description: Unique identifier of the user who makes the search request. - in: header - required: true - schema: - $ref: '#/components/schemas/userID' - UserIDInPath: - name: userID - description: Unique identifier of the user who makes the search request. - in: path - required: true - schema: - $ref: '#/components/schemas/userID' + The required ACL to make a request is listed in each endpoint's + reference. schemas: + attributeToUpdate: + x-keep-model: true + deprecated: true + oneOf: + - type: string + - $ref: '#/components/schemas/builtInOperation' ErrorBase: description: Error. type: object + x-keep-model: true additionalProperties: true properties: message: @@ -3687,7 +3709,8 @@ components: default: '' searchParamsString: type: object - title: Search parameters as query string + title: Search parameters as query string. + description: Search parameters as query string. additionalProperties: false x-discriminator-fields: - params @@ -3936,6 +3959,7 @@ components: title: range objects type: array items: + title: range type: object description: >- Range object with lower and upper values in meters to define custom @@ -4249,7 +4273,7 @@ components: length: type: integer description: Number of hits to retrieve (used in combination with `offset`). - minimum: 1 + minimum: 0 maximum: 1000 x-categories: - Pagination @@ -4426,6 +4450,11 @@ components: - $ref: '#/components/schemas/typoToleranceEnum' x-categories: - Typos + booleanString: + type: string + enum: + - 'true' + - 'false' ignorePlurals: description: | Treat singular, plurals, and other forms of declensions as equivalent. @@ -4440,6 +4469,7 @@ components: This overrides languages you set with `queryLanguages`. items: $ref: '#/components/schemas/supportedLanguage' + - $ref: '#/components/schemas/booleanString' - type: boolean description: > If true, `ignorePlurals` is active for all languages included in @@ -5116,7 +5146,8 @@ components: decompoundQuery: type: boolean description: > - Whether to split compound words into their building blocks. + Whether to split compound words in the query into their building + blocks. For more information, see [Word @@ -5124,6 +5155,12 @@ components: Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. + + Decompounding doesn't work for words with [non-spacing mark Unicode + characters](https://www.charactercodes.net/category/non-spacing_mark). + + For example, `Gartenstühle` won't be decompounded if the `ü` + consists of `u` (U+0075) and `◌̈` (U+0308). default: true x-categories: - Languages @@ -5451,6 +5488,7 @@ components: type: boolean description: Redirect rule status. data: + title: redirectRuleIndexData type: object description: Redirect rule data. required: @@ -5502,8 +5540,8 @@ components: type: string description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: - type: object title: exhaustive + type: object description: >- Whether certain properties of the search response are calculated exhaustive (exact) or approximated. @@ -5579,12 +5617,11 @@ components: food: 1 tech: 42 facets_stats: - title: facetsStats type: object description: Statistics for numerical facets. additionalProperties: - type: object title: facetStats + type: object properties: min: type: number @@ -5668,6 +5705,9 @@ components: Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). example: a00dbc80a8d13c4565a442e7e2dca80a + _automaticInsights: + type: boolean + description: Whether automatic events collection is enabled for the application. nbHits: type: integer description: Number of results (hits). @@ -5688,11 +5728,6 @@ components: $ref: '#/components/schemas/nbPages' hitsPerPage: $ref: '#/components/schemas/hitsPerPage' - required: - - page - - nbHits - - nbPages - - hitsPerPage objectID: type: string description: Unique record identifier. @@ -5731,27 +5766,24 @@ components: - value - matchLevel - matchedWords - highlightResultOptionMap: + x-discriminator-fields: + - matchLevel + - matchedWords + highlightResultMap: type: object description: Surround words that match the query with HTML tags for highlighting. additionalProperties: x-additionalPropertiesName: attribute - $ref: '#/components/schemas/highlightResultOption' - highlightResultOptionArray: - type: array - description: Surround words that match the query with HTML tags for highlighting. - items: - $ref: '#/components/schemas/highlightResultOption' + $ref: '#/components/schemas/highlightResult' highlightResult: oneOf: - $ref: '#/components/schemas/highlightResultOption' - - $ref: '#/components/schemas/highlightResultOptionMap' - - $ref: '#/components/schemas/highlightResultOptionArray' - highlightResultMap: - type: object + - $ref: '#/components/schemas/highlightResultMap' + - $ref: '#/components/schemas/highlightResultArray' + highlightResultArray: + type: array description: Surround words that match the query with HTML tags for highlighting. - additionalProperties: - x-additionalPropertiesName: attribute + items: $ref: '#/components/schemas/highlightResult' snippetResultOption: type: object @@ -5765,27 +5797,23 @@ components: required: - value - matchLevel - snippetResultOptionMap: + x-discriminator-fields: + - matchLevel + snippetResultMap: type: object description: Snippets that show the context around a matching search query. additionalProperties: x-additionalPropertiesName: attribute - $ref: '#/components/schemas/snippetResultOption' - snippetResultOptionArray: - type: array - description: Snippets that show the context around a matching search query. - items: - $ref: '#/components/schemas/snippetResultOption' + $ref: '#/components/schemas/snippetResult' snippetResult: oneOf: - $ref: '#/components/schemas/snippetResultOption' - - $ref: '#/components/schemas/snippetResultOptionMap' - - $ref: '#/components/schemas/snippetResultOptionArray' - snippetResultMap: - type: object + - $ref: '#/components/schemas/snippetResultMap' + - $ref: '#/components/schemas/snippetResultArray' + snippetResultArray: + type: array description: Snippets that show the context around a matching search query. - additionalProperties: - x-additionalPropertiesName: attribute + items: $ref: '#/components/schemas/snippetResult' matchedGeoLocation: type: object @@ -5880,7 +5908,7 @@ components: - geoDistance - nbExactWords - userScore - _distinctSeqID: + distinctSeqID: type: integer hit: type: object @@ -5904,7 +5932,7 @@ components: _rankingInfo: $ref: '#/components/schemas/rankingInfo' _distinctSeqID: - $ref: '#/components/schemas/_distinctSeqID' + $ref: '#/components/schemas/distinctSeqID' searchHits: type: object additionalProperties: true @@ -6033,8 +6061,8 @@ components: type: array description: Matching facet values. items: - type: object title: facetHits + type: object additionalProperties: false required: - value @@ -6125,9 +6153,6 @@ components: type: string example: '2023-06-27T14:42:38.831Z' description: Date and time when the object was deleted, in RFC 3339 format. - attribute: - type: string - description: Value of the attribute to update. updatedAt: type: string example: '2023-07-04T12:49:15Z' @@ -6164,36 +6189,6 @@ components: $ref: '#/components/schemas/taskID' updatedAt: $ref: '#/components/schemas/updatedAt' - builtInOperationType: - type: string - enum: - - Increment - - Decrement - - Add - - Remove - - AddUnique - - IncrementFrom - - IncrementSet - description: How to change the attribute. - builtInOperation: - type: object - description: Update to perform on the attribute. - additionalProperties: false - properties: - _operation: - $ref: '#/components/schemas/builtInOperationType' - value: - type: string - description: >- - Value that corresponds to the operation, for example an `Increment` - or `Decrement` step, or an `Add` or `Remove` value. - required: - - _operation - - value - attributeToUpdate: - oneOf: - - $ref: '#/components/schemas/attribute' - - $ref: '#/components/schemas/builtInOperation' action: type: string enum: @@ -6205,6 +6200,48 @@ components: - delete - clear description: Type of indexing operation. + batchWriteParams: + title: batchWriteParams + description: Batch parameters. + type: object + additionalProperties: false + properties: + requests: + type: array + items: + title: batchRequest + type: object + additionalProperties: false + properties: + action: + $ref: '#/components/schemas/action' + body: + type: object + description: Operation arguments (varies with specified `action`). + example: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + required: + - action + - body + required: + - requests + example: + batch: + summary: Batch indexing request + value: + requests: + - action: addObject + body: + name: Betty Jane McCamey + company: Vita Foods Inc. + email: betty@mccamey.com + - action: addObject + body: + name: Gayla geimer + company: Ortman McCain Co. + email: gayla@geimer.com objectIDs: type: array items: @@ -6226,7 +6263,6 @@ components: - objectIDs baseIndexSettings: type: object - title: Index settings. additionalProperties: false properties: attributesForFaceting: @@ -6421,6 +6457,12 @@ components: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). + + Decompounding doesn't work for words with [non-spacing mark Unicode + characters](https://www.charactercodes.net/category/non-spacing_mark). + + For example, `Gartenstühle` won't be decompounded if the `ü` + consists of `u` (U+0075) and `◌̈` (U+0308). default: {} x-categories: - Languages @@ -6619,6 +6661,19 @@ components: allOf: - $ref: '#/components/schemas/baseIndexSettings' - $ref: '#/components/schemas/indexSettingsAsSearchParams' + WithPrimary: + type: object + additionalProperties: false + properties: + primary: + type: string + description: > + Replica indices only: the name of the primary index for this + replica. + settingsResponse: + allOf: + - $ref: '#/components/schemas/indexSettings' + - $ref: '#/components/schemas/WithPrimary' SynonymType: type: string description: Synonym type. @@ -7106,6 +7161,8 @@ components: required: - position - objectIDs + x-discriminator-fields: + - objectIDs promoteObjectID: title: objectID description: Record to promote. @@ -7119,6 +7176,8 @@ components: required: - position - objectID + x-discriminator-fields: + - objectID promote: oneOf: - $ref: '#/components/schemas/promoteObjectIDs' @@ -7287,13 +7346,20 @@ components: - disabled default: enabled description: Whether a dictionary entry is active. + dictionaryEntryType: + type: string + enum: + - custom + - standard + description: >- + Whether a dictionary entry is provided by Algolia (standard), or has + been added by you (custom). dictionaryEntry: type: object description: Dictionary entry. additionalProperties: true required: - objectID - - language properties: objectID: type: string @@ -7328,6 +7394,8 @@ components: type: string state: $ref: '#/components/schemas/dictionaryEntryState' + type: + $ref: '#/components/schemas/dictionaryEntryType' searchDictionaryEntriesResponse: type: object additionalProperties: false @@ -7473,6 +7541,15 @@ components: description: >- Task status, `published` if the task is completed, `notPublished` otherwise. + GetTaskResponse: + title: getTaskResponse + type: object + additionalProperties: false + properties: + status: + $ref: '#/components/schemas/taskStatus' + required: + - status operationType: type: string enum: @@ -7672,6 +7749,155 @@ components: - copyOperationResponse - batchResponses - moveOperationResponse + builtInOperationType: + type: string + enum: + - Increment + - Decrement + - Add + - Remove + - AddUnique + - IncrementFrom + - IncrementSet + description: How to change the attribute. + builtInOperationValue: + oneOf: + - type: string + description: >- + A string to append or remove for the `Add`, `Remove`, and + `AddUnique` operations. + - type: integer + description: A number to add, remove, or append, depending on the operation. + builtInOperation: + type: object + description: Update to perform on the attribute. + additionalProperties: false + properties: + _operation: + $ref: '#/components/schemas/builtInOperationType' + value: + $ref: '#/components/schemas/builtInOperationValue' + required: + - _operation + - value + parameters: + PathInPath: + name: path + in: path + description: Path of the endpoint, anything after "/1" must be specified. + required: true + schema: + type: string + example: /keys + Parameters: + name: parameters + in: query + description: Query parameters to apply to the current query. + schema: + type: object + additionalProperties: true + IndexName: + name: indexName + in: path + description: Name of the index on which to perform the operation. + required: true + schema: + type: string + example: YourIndexName + ObjectID: + name: objectID + in: path + description: Unique record identifier. + required: true + schema: + $ref: '#/components/schemas/objectID' + ForwardToReplicas: + in: query + name: forwardToReplicas + required: false + description: Whether changes are applied to replica indices. + schema: + type: boolean + parameters_ObjectID: + name: objectID + in: path + description: Unique identifier of a synonym object. + required: true + schema: + type: string + example: synonymID + ReplaceExistingSynonyms: + in: query + name: replaceExistingSynonyms + schema: + type: boolean + description: >- + Whether to replace all synonyms in the index with the ones sent with + this request. + KeyString: + in: path + name: key + required: true + schema: + type: string + example: YourAPIKey + description: API key. + ObjectIDRule: + in: path + name: objectID + description: Unique identifier of a rule object. + required: true + schema: + $ref: '#/components/schemas/ruleID' + ClearExistingRules: + in: query + name: clearExistingRules + required: false + schema: + type: boolean + description: Whether existing rules should be deleted before adding this batch. + DictionaryName: + in: path + name: dictionaryName + description: Dictionary type in which to search. + required: true + schema: + $ref: '#/components/schemas/dictionaryType' + Page: + in: query + name: page + description: | + Requested page of the API response. + If `null`, the API response is not paginated. + required: false + schema: + oneOf: + - type: integer + minimum: 0 + - type: 'null' + default: null + HitsPerPage: + in: query + name: hitsPerPage + description: Number of hits per page. + required: false + schema: + type: integer + default: 100 + UserIDInHeader: + name: X-Algolia-User-ID + description: Unique identifier of the user who makes the search request. + in: header + required: true + schema: + $ref: '#/components/schemas/userID' + UserIDInPath: + name: userID + description: Unique identifier of the user who makes the search request. + in: path + required: true + schema: + $ref: '#/components/schemas/userID' responses: BadRequest: description: Bad request or request arguments. diff --git a/pkg/cmdutil/spec_flags.go b/pkg/cmdutil/spec_flags.go index aa3c0d1b..3962963c 100644 --- a/pkg/cmdutil/spec_flags.go +++ b/pkg/cmdutil/spec_flags.go @@ -293,7 +293,7 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/clickAnalytics/`)) cmd.Flags().StringSlice("customRanking", []string{}, heredoc.Doc(`Attributes to use as custom ranking. See: https://www.algolia.com/doc/api-reference/api-parameters/customRanking/`)) cmd.Flags().SetAnnotation("customRanking", "Categories", []string{"Ranking"}) - cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words into their building blocks. + cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words in the query into their building blocks. See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundQuery/`)) cmd.Flags().SetAnnotation("decompoundQuery", "Categories", []string{"Languages"}) cmd.Flags().StringSlice("disableExactOnAttributes", []string{}, heredoc.Doc(`Searchable attributes for which you want to turn off the Exact ranking criterion. @@ -346,7 +346,7 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/highlightPreTag/`) cmd.Flags().Int("hitsPerPage", 20, heredoc.Doc(`Number of hits per page. See: https://www.algolia.com/doc/api-reference/api-parameters/hitsPerPage/`)) cmd.Flags().SetAnnotation("hitsPerPage", "Categories", []string{"Pagination"}) - ignorePlurals := NewJSONVar([]string{"array", "boolean"}...) + ignorePlurals := NewJSONVar([]string{"array", "string", "boolean"}...) cmd.Flags().Var(ignorePlurals, "ignorePlurals", heredoc.Doc(`Treat singular, plurals, and other forms of declensions as equivalent. See: https://www.algolia.com/doc/api-reference/api-parameters/ignorePlurals/`)) cmd.Flags().SetAnnotation("ignorePlurals", "Categories", []string{"Languages"}) @@ -551,7 +551,7 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/customNormalizatio cmd.Flags().StringSlice("customRanking", []string{}, heredoc.Doc(`Attributes to use as custom ranking. See: https://www.algolia.com/doc/api-reference/api-parameters/customRanking/`)) cmd.Flags().SetAnnotation("customRanking", "Categories", []string{"Ranking"}) - cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words into their building blocks. + cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words in the query into their building blocks. See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundQuery/`)) cmd.Flags().SetAnnotation("decompoundQuery", "Categories", []string{"Languages"}) decompoundedAttributes := NewJSONVar([]string{}...) @@ -595,7 +595,7 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/highlightPreTag/`) cmd.Flags().Int("hitsPerPage", 20, heredoc.Doc(`Number of hits per page. See: https://www.algolia.com/doc/api-reference/api-parameters/hitsPerPage/`)) cmd.Flags().SetAnnotation("hitsPerPage", "Categories", []string{"Pagination"}) - ignorePlurals := NewJSONVar([]string{"array", "boolean"}...) + ignorePlurals := NewJSONVar([]string{"array", "string", "boolean"}...) cmd.Flags().Var(ignorePlurals, "ignorePlurals", heredoc.Doc(`Treat singular, plurals, and other forms of declensions as equivalent. See: https://www.algolia.com/doc/api-reference/api-parameters/ignorePlurals/`)) cmd.Flags().SetAnnotation("ignorePlurals", "Categories", []string{"Languages"}) @@ -746,7 +746,7 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/clickAnalytics/`)) cmd.Flags().StringSlice("customRanking", []string{}, heredoc.Doc(`Attributes to use as custom ranking. See: https://www.algolia.com/doc/api-reference/api-parameters/customRanking/`)) cmd.Flags().SetAnnotation("customRanking", "Categories", []string{"Ranking"}) - cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words into their building blocks. + cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words in the query into their building blocks. See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundQuery/`)) cmd.Flags().SetAnnotation("decompoundQuery", "Categories", []string{"Languages"}) cmd.Flags().StringSlice("disableExactOnAttributes", []string{}, heredoc.Doc(`Searchable attributes for which you want to turn off the Exact ranking criterion. @@ -799,7 +799,7 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/highlightPreTag/`) cmd.Flags().Int("hitsPerPage", 20, heredoc.Doc(`Number of hits per page. See: https://www.algolia.com/doc/api-reference/api-parameters/hitsPerPage/`)) cmd.Flags().SetAnnotation("hitsPerPage", "Categories", []string{"Pagination"}) - ignorePlurals := NewJSONVar([]string{"array", "boolean"}...) + ignorePlurals := NewJSONVar([]string{"array", "string", "boolean"}...) cmd.Flags().Var(ignorePlurals, "ignorePlurals", heredoc.Doc(`Treat singular, plurals, and other forms of declensions as equivalent. See: https://www.algolia.com/doc/api-reference/api-parameters/ignorePlurals/`)) cmd.Flags().SetAnnotation("ignorePlurals", "Categories", []string{"Languages"})