diff --git a/eslint/src/rules/validACL.ts b/eslint/src/rules/validACL.ts index 0f4acbbcfa9..47f7e68ea12 100644 --- a/eslint/src/rules/validACL.ts +++ b/eslint/src/rules/validACL.ts @@ -1,7 +1,7 @@ // @ts-ignore import { createRule } from 'eslint-plugin-yml/lib/utils'; -import { isPairWithKey, isScalar } from '../utils.js'; +import { isPairWithKey, isPairWithValue, isScalar } from '../utils.js'; const ACLs = [ 'search', @@ -23,12 +23,13 @@ const ACLs = [ export const validACL = createRule('validACL', { meta: { docs: { - description: 'x-acl enum must contains valid Algolia ACLs', + description: 'x-acl enum must be set and contain valid Algolia ACLs', categories: null, extensionRule: false, layout: false, }, messages: { + missingACL: 'x-acl is missing', validString: 'is not a string', validACL: `{{entry}} is not a valid Algolia ACL, must be one of: ${ACLs.join(', ')}.`, validArray: 'is not an array of string', @@ -43,6 +44,41 @@ export const validACL = createRule('validACL', { return { YAMLPair(node): void { + const spec = context.getFilename().match(/specs\/([a-z-]+?)\//)?.[1]; + if (!spec) { + return; + } + if (spec === 'monitoring') { + // monitoring uses a special API key and doesn't need ACLs + return; + } + + if (spec === 'crawler') { + // no clients are generated for the crawler API + return; + } + + // if we find then prop operationId, there must be x-acl on the same level + if (isPairWithKey(node, 'operationId')) { + const hasACL = node.parent.pairs.some((item: any) => isPairWithKey(item, 'x-acl')); + + // ignore custom helpers + if (isPairWithValue(node, 'customGet') || isPairWithValue(node, 'customPost') || isPairWithValue(node, 'customPut') || isPairWithValue(node, 'customDelete')) { + return; + } + + + if (!hasACL) { + context.report({ + node: node as any, + messageId: 'missingACL', + }); + } + + return; + } + + // check the validity of x-acl if (!isPairWithKey(node, 'x-acl')) { return; } diff --git a/eslint/tests/validACL.test.ts b/eslint/tests/validACL.test.ts index 3d978be230f..307d6b41554 100644 --- a/eslint/tests/validACL.test.ts +++ b/eslint/tests/validACL.test.ts @@ -30,6 +30,16 @@ nested: ], invalid: [ { + filename: 'api-client-automation/specs/search/path/test.yml', + code: ` +post: + operationId: test + description: Test endpoint without ACL +`, + errors: [{ messageId: 'missingACL' }], + }, + { + filename: 'api-client-automation/specs/search/path/test.yml', code: ` x-acl: - notACL @@ -38,6 +48,7 @@ x-acl: errors: [{ messageId: 'validACL' }], }, { + filename: 'api-client-automation/specs/search/path/test.yml', code: ` nested: inside: @@ -48,12 +59,14 @@ nested: errors: [{ messageId: 'validACL' }], }, { + filename: 'api-client-automation/specs/search/path/test.yml', code: ` x-acl: notList `, errors: [{ messageId: 'validArray' }], }, { + filename: 'api-client-automation/specs/search/path/test.yml', code: ` x-acl: - ['search'] diff --git a/specs/common/helpers/setClientApiKey.yml b/specs/common/helpers/setClientApiKey.yml index 91c5f74571b..fa0a95033ff 100644 --- a/specs/common/helpers/setClientApiKey.yml +++ b/specs/common/helpers/setClientApiKey.yml @@ -2,6 +2,7 @@ method: get: x-helper: true x-asynchronous-helper: false + x-acl: [] tags: - Api Key operationId: setClientApiKey diff --git a/specs/composition/helpers/waitForCompositionTask.yml b/specs/composition/helpers/waitForCompositionTask.yml index 85d1da58942..661a6ea1625 100644 --- a/specs/composition/helpers/waitForCompositionTask.yml +++ b/specs/composition/helpers/waitForCompositionTask.yml @@ -4,6 +4,12 @@ method: tags: - Records operationId: waitForCompositionTask + x-acl: + - editSettings + - settings + - addObject + - deleteObject + - deleteIndex summary: Wait for operation to complete description: | Wait for a task to complete to ensure synchronized composition updates. diff --git a/specs/crawler/paths/crawler.yml b/specs/crawler/paths/crawler.yml index 8e3635c5fcd..7a8ff851032 100644 --- a/specs/crawler/paths/crawler.yml +++ b/specs/crawler/paths/crawler.yml @@ -5,6 +5,8 @@ get: Retrieves details about the specified crawler, optionally with its configuration. tags: - crawlers + x-acl: + - settings parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' - in: query @@ -42,6 +44,8 @@ patch: description: Update configuration. tags: - crawlers + x-acl: + - editSettings parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' requestBody: @@ -70,6 +74,8 @@ delete: description: Delete the specified crawler. tags: - crawlers + x-acl: + - editSettings parameters: - $ref: '#/components/parameters/CrawlerIdParameter' responses: diff --git a/specs/crawler/paths/crawlerConfig.yml b/specs/crawler/paths/crawlerConfig.yml index de112425d50..37292d6a101 100644 --- a/specs/crawler/paths/crawlerConfig.yml +++ b/specs/crawler/paths/crawlerConfig.yml @@ -6,6 +6,8 @@ patch: Every time you update the configuration, a new version is created. tags: - config + x-acl: + - editSettings parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' requestBody: diff --git a/specs/crawler/paths/crawlerConfigVersion.yml b/specs/crawler/paths/crawlerConfigVersion.yml index d2071d8df27..2f0a0801d06 100644 --- a/specs/crawler/paths/crawlerConfigVersion.yml +++ b/specs/crawler/paths/crawlerConfigVersion.yml @@ -7,6 +7,8 @@ get: You can use this to restore a previous version of the configuration. tags: - config + x-acl: + - settings parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' - $ref: '../common/parameters.yml#/CrawlerVersionParameter' diff --git a/specs/crawler/paths/crawlerConfigVersions.yml b/specs/crawler/paths/crawlerConfigVersions.yml index 5606b91c419..21ad215801d 100644 --- a/specs/crawler/paths/crawlerConfigVersions.yml +++ b/specs/crawler/paths/crawlerConfigVersions.yml @@ -6,6 +6,8 @@ get: Every time you update a crawler's configuration, a new version is added. tags: - config + x-acl: + - settings parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' - $ref: '../common/parameters.yml#/ItemsPerPage' diff --git a/specs/crawler/paths/crawlerCrawl.yml b/specs/crawler/paths/crawlerCrawl.yml index 1520c684913..03b677e5133 100644 --- a/specs/crawler/paths/crawlerCrawl.yml +++ b/specs/crawler/paths/crawlerCrawl.yml @@ -9,6 +9,7 @@ post: This operation is rate-limited to 500 requests every 24 hours. tags: - actions + x-acl: [] parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' requestBody: diff --git a/specs/crawler/paths/crawlerPause.yml b/specs/crawler/paths/crawlerPause.yml index 2de21d22ed8..2b7c4deb281 100644 --- a/specs/crawler/paths/crawlerPause.yml +++ b/specs/crawler/paths/crawlerPause.yml @@ -4,6 +4,7 @@ post: description: Pauses the specified crawler. tags: - actions + x-acl: [] parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' responses: diff --git a/specs/crawler/paths/crawlerReindex.yml b/specs/crawler/paths/crawlerReindex.yml index 5f337e7d842..69ec2951de7 100644 --- a/specs/crawler/paths/crawlerReindex.yml +++ b/specs/crawler/paths/crawlerReindex.yml @@ -4,6 +4,7 @@ post: description: Starts or resumes a crawl. tags: - actions + x-acl: [] parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' responses: diff --git a/specs/crawler/paths/crawlerRun.yml b/specs/crawler/paths/crawlerRun.yml index e0f5dd910ad..c6c10b62544 100644 --- a/specs/crawler/paths/crawlerRun.yml +++ b/specs/crawler/paths/crawlerRun.yml @@ -7,6 +7,7 @@ post: Otherwise, the crawler waits for its next scheduled run. tags: - actions + x-acl: [] parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' responses: diff --git a/specs/crawler/paths/crawlerStats.yml b/specs/crawler/paths/crawlerStats.yml index 25f58c1507e..b087111493f 100644 --- a/specs/crawler/paths/crawlerStats.yml +++ b/specs/crawler/paths/crawlerStats.yml @@ -4,6 +4,8 @@ get: description: Retrieves information about the number of crawled, skipped, and failed URLs. tags: - crawlers + x-acl: + - settings parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' responses: diff --git a/specs/crawler/paths/crawlerTask.yml b/specs/crawler/paths/crawlerTask.yml index a0694c8ae5d..6a054c6d873 100644 --- a/specs/crawler/paths/crawlerTask.yml +++ b/specs/crawler/paths/crawlerTask.yml @@ -4,6 +4,8 @@ get: description: Retrieves the status of the specified tasks, whether they're pending or completed. tags: - tasks + x-acl: + - settings parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' - $ref: '../common/parameters.yml#/TaskIdParameter' diff --git a/specs/crawler/paths/crawlerTaskCancel.yml b/specs/crawler/paths/crawlerTaskCancel.yml index c699b3ef79a..8f5ad923187 100644 --- a/specs/crawler/paths/crawlerTaskCancel.yml +++ b/specs/crawler/paths/crawlerTaskCancel.yml @@ -8,6 +8,7 @@ post: To unblock the crawler, cancel the blocking task. tags: - tasks + x-acl: [] parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' - $ref: '../common/parameters.yml#/TaskIdParameter' diff --git a/specs/crawler/paths/crawlerTest.yml b/specs/crawler/paths/crawlerTest.yml index d1b0ac179b5..3831808d576 100644 --- a/specs/crawler/paths/crawlerTest.yml +++ b/specs/crawler/paths/crawlerTest.yml @@ -7,6 +7,7 @@ post: You can test configuration changes by overriding specific parts before updating the full configuration. tags: - actions + x-acl: [] parameters: - $ref: '../common/parameters.yml#/CrawlerIdParameter' requestBody: diff --git a/specs/crawler/paths/crawlers.yml b/specs/crawler/paths/crawlers.yml index f78f13a6b0a..ae843493b0c 100644 --- a/specs/crawler/paths/crawlers.yml +++ b/specs/crawler/paths/crawlers.yml @@ -4,6 +4,8 @@ get: description: Lists all your crawlers. tags: - crawlers + x-acl: + - settings parameters: - $ref: '../common/parameters.yml#/ItemsPerPage' - $ref: '../common/parameters.yml#/Page' @@ -30,6 +32,8 @@ post: description: Creates a new crawler with the provided configuration. tags: - crawlers + x-acl: + - editSettings requestBody: content: application/json: diff --git a/specs/crawler/paths/docsearch.yml b/specs/crawler/paths/docsearch.yml index ae530e05007..561282ddc41 100644 --- a/specs/crawler/paths/docsearch.yml +++ b/specs/crawler/paths/docsearch.yml @@ -2,6 +2,7 @@ post: operationId: createDocSearchApp summary: Create a new Algolia app with the DocSearch plan description: Create a new Algolia app with the DocSearch plan. + x-acl: [] requestBody: content: application/json: diff --git a/specs/crawler/paths/domains.yml b/specs/crawler/paths/domains.yml index 6b2dd93f407..dcf749bb96f 100644 --- a/specs/crawler/paths/domains.yml +++ b/specs/crawler/paths/domains.yml @@ -7,6 +7,8 @@ get: Crawlers will only run if the URLs match any of the registered domains. tags: - domains + x-acl: + - settings parameters: - $ref: '../common/parameters.yml#/ItemsPerPage' - $ref: '../common/parameters.yml#/Page' diff --git a/specs/ingestion/helpers/chunkedPush.yml b/specs/ingestion/helpers/chunkedPush.yml index 5b43846805d..7c979d0cab9 100644 --- a/specs/ingestion/helpers/chunkedPush.yml +++ b/specs/ingestion/helpers/chunkedPush.yml @@ -10,6 +10,10 @@ method: - javascript - php - python + x-acl: + - addObject + - deleteIndex + - editSettings operationId: chunkedPush summary: Replace all records in an index description: | diff --git a/specs/ingestion/paths/tasks/v1/taskID.yml b/specs/ingestion/paths/tasks/v1/taskID.yml index b8adb0cc0d0..7a660abd105 100644 --- a/specs/ingestion/paths/tasks/v1/taskID.yml +++ b/specs/ingestion/paths/tasks/v1/taskID.yml @@ -27,6 +27,10 @@ patch: summary: Update a task V1 description: Updates a task by its ID using the v1 endpoint, please use `updateTask` instead. operationId: updateTaskV1 + x-acl: + - addObject + - deleteIndex + - editSettings deprecated: true parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' @@ -53,6 +57,10 @@ delete: summary: Delete a task description: Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead. operationId: deleteTaskV1 + x-acl: + - addObject + - deleteIndex + - editSettings deprecated: true parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' diff --git a/specs/ingestion/paths/tasks/v1/tasks.yml b/specs/ingestion/paths/tasks/v1/tasks.yml index 15eb55429cc..05c0985851a 100644 --- a/specs/ingestion/paths/tasks/v1/tasks.yml +++ b/specs/ingestion/paths/tasks/v1/tasks.yml @@ -48,6 +48,10 @@ post: summary: Create a task V1 description: Creates a new task using the v1 endpoint, please use `createTask` instead. operationId: createTaskV1 + x-acl: + - addObject + - deleteIndex + - editSettings deprecated: true x-codegen-request-body-name: taskCreate requestBody: diff --git a/specs/ingestion/paths/tasks/v2/taskID.yml b/specs/ingestion/paths/tasks/v2/taskID.yml index 67f449c9051..397ecc49ffb 100644 --- a/specs/ingestion/paths/tasks/v2/taskID.yml +++ b/specs/ingestion/paths/tasks/v2/taskID.yml @@ -1,13 +1,13 @@ get: tags: - tasks - summary: Retrieve a task - description: Retrieves a task by its ID. - operationId: getTask x-acl: - addObject - deleteIndex - editSettings + summary: Retrieve a task + description: Retrieves a task by its ID. + operationId: getTask parameters: - $ref: '../../../common/parameters.yml#/pathTaskID' responses: @@ -23,6 +23,10 @@ get: put: tags: - tasks + x-acl: + - addObject + - deleteIndex + - editSettings summary: Fully update a task description: Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields. operationId: replaceTask @@ -48,6 +52,10 @@ put: patch: tags: - tasks + x-acl: + - addObject + - deleteIndex + - editSettings summary: Partially update a task description: Partially updates a task by its ID. operationId: updateTask @@ -72,6 +80,10 @@ patch: delete: tags: - tasks + x-acl: + - addObject + - deleteIndex + - editSettings summary: Delete a task description: Deletes a task by its ID. operationId: deleteTask diff --git a/specs/ingestion/paths/tasks/v2/tasks.yml b/specs/ingestion/paths/tasks/v2/tasks.yml index ebd6dc4e930..922810bf859 100644 --- a/specs/ingestion/paths/tasks/v2/tasks.yml +++ b/specs/ingestion/paths/tasks/v2/tasks.yml @@ -50,6 +50,10 @@ post: summary: Create a task description: Creates a new task. operationId: createTask + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: description: Request body for creating a task. content: diff --git a/specs/ingestion/paths/transformations/transformationID.yml b/specs/ingestion/paths/transformations/transformationID.yml index 58e3468aff5..0f80c6bc22c 100644 --- a/specs/ingestion/paths/transformations/transformationID.yml +++ b/specs/ingestion/paths/transformations/transformationID.yml @@ -26,6 +26,10 @@ put: summary: Update a transformation description: Updates a transformation by its ID. operationId: updateTransformation + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathTransformationID' requestBody: @@ -50,6 +54,10 @@ delete: summary: Delete a transformation description: Deletes a transformation by its ID. operationId: deleteTransformation + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathTransformationID' responses: diff --git a/specs/ingestion/paths/transformations/transformations.yml b/specs/ingestion/paths/transformations/transformations.yml index c50e7f6bc9a..41dfc06781e 100644 --- a/specs/ingestion/paths/transformations/transformations.yml +++ b/specs/ingestion/paths/transformations/transformations.yml @@ -44,6 +44,10 @@ post: summary: Create a transformation description: Creates a new transformation. operationId: createTransformation + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: description: Request body for creating a transformation. content: diff --git a/specs/search/helpers/browseObjects.yml b/specs/search/helpers/browseObjects.yml index a44ddfe6bde..cc8e87885a8 100644 --- a/specs/search/helpers/browseObjects.yml +++ b/specs/search/helpers/browseObjects.yml @@ -3,6 +3,8 @@ method: x-helper: true tags: - Records + x-acl: + - browse operationId: browseObjects summary: Get all records from an index description: | diff --git a/specs/search/helpers/chunkedBatch.yml b/specs/search/helpers/chunkedBatch.yml index e0139e4a4f3..cd5b49c454b 100644 --- a/specs/search/helpers/chunkedBatch.yml +++ b/specs/search/helpers/chunkedBatch.yml @@ -3,6 +3,8 @@ method: x-helper: true tags: - Records + x-acl: + - addObject operationId: chunkedBatch summary: Replace all records in an index description: | diff --git a/specs/search/helpers/deleteObjects.yml b/specs/search/helpers/deleteObjects.yml index 6b20ed7d8eb..f13558e022c 100644 --- a/specs/search/helpers/deleteObjects.yml +++ b/specs/search/helpers/deleteObjects.yml @@ -14,6 +14,8 @@ method: - ruby - scala - swift + x-acl: + - addObject operationId: deleteObjects summary: Deletes every records for the given objectIDs description: | diff --git a/specs/search/helpers/generateSecuredApiKey.yml b/specs/search/helpers/generateSecuredApiKey.yml index e781655ba72..5018b203469 100644 --- a/specs/search/helpers/generateSecuredApiKey.yml +++ b/specs/search/helpers/generateSecuredApiKey.yml @@ -15,6 +15,7 @@ method: - ruby - scala - swift + x-acl: [] operationId: generateSecuredApiKey summary: Create secured API keys description: | diff --git a/specs/search/helpers/indexExists.yml b/specs/search/helpers/indexExists.yml index 77efbffd07a..429acf77adc 100644 --- a/specs/search/helpers/indexExists.yml +++ b/specs/search/helpers/indexExists.yml @@ -14,6 +14,8 @@ method: - ruby - scala - swift + x-acl: + - settings operationId: indexExists summary: Check if an index exists or not description: | diff --git a/specs/search/helpers/partialUpdateObjects.yml b/specs/search/helpers/partialUpdateObjects.yml index 4c85fe05d67..b5c70aacd3d 100644 --- a/specs/search/helpers/partialUpdateObjects.yml +++ b/specs/search/helpers/partialUpdateObjects.yml @@ -14,6 +14,8 @@ method: - ruby - scala - swift + x-acl: + - addObject operationId: partialUpdateObjects summary: Replaces object content of all the given objects according to their respective `objectID` field description: | diff --git a/specs/search/helpers/partialUpdateObjectsWithTransformation.yml b/specs/search/helpers/partialUpdateObjectsWithTransformation.yml index e322de4ee53..a5759ccfb13 100644 --- a/specs/search/helpers/partialUpdateObjectsWithTransformation.yml +++ b/specs/search/helpers/partialUpdateObjectsWithTransformation.yml @@ -10,6 +10,10 @@ method: - python tags: - Records + x-acl: + - addObject + - deleteIndex + - editSettings operationId: partialUpdateObjectsWithTransformation summary: Save objects to an Algolia index by leveraging the Transformation pipeline setup using the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push) description: | diff --git a/specs/search/helpers/replaceAllObjects.yml b/specs/search/helpers/replaceAllObjects.yml index f1e25ca0bd8..0e31c42a322 100644 --- a/specs/search/helpers/replaceAllObjects.yml +++ b/specs/search/helpers/replaceAllObjects.yml @@ -14,6 +14,8 @@ method: - ruby - scala - swift + x-acl: + - addObject operationId: replaceAllObjects summary: Replace all records in an index description: | diff --git a/specs/search/helpers/replaceAllObjectsWithTransformation.yml b/specs/search/helpers/replaceAllObjectsWithTransformation.yml index 5d4f4510de8..282cb922edd 100644 --- a/specs/search/helpers/replaceAllObjectsWithTransformation.yml +++ b/specs/search/helpers/replaceAllObjectsWithTransformation.yml @@ -10,6 +10,10 @@ method: - javascript - php - python + x-acl: + - addObject + - deleteIndex + - editSettings operationId: replaceAllObjectsWithTransformation summary: Replace all records in an index description: | diff --git a/specs/search/helpers/saveObjects.yml b/specs/search/helpers/saveObjects.yml index a33b27c256d..ac364879b88 100644 --- a/specs/search/helpers/saveObjects.yml +++ b/specs/search/helpers/saveObjects.yml @@ -14,6 +14,8 @@ method: - ruby - scala - swift + x-acl: + - addObject operationId: saveObjects summary: Saves the given array of objects in the given index description: | diff --git a/specs/search/helpers/saveObjectsWithTransformation.yml b/specs/search/helpers/saveObjectsWithTransformation.yml index 8a587170bc1..14f4f3cca97 100644 --- a/specs/search/helpers/saveObjectsWithTransformation.yml +++ b/specs/search/helpers/saveObjectsWithTransformation.yml @@ -10,6 +10,10 @@ method: - javascript - php - python + x-acl: + - addObject + - deleteIndex + - editSettings operationId: saveObjectsWithTransformation summary: Save objects to an Algolia index by leveraging the Transformation pipeline setup using the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push) description: | diff --git a/specs/search/helpers/waitForApiKey.yml b/specs/search/helpers/waitForApiKey.yml index 52b5b9dc4cc..d5451941ac3 100644 --- a/specs/search/helpers/waitForApiKey.yml +++ b/specs/search/helpers/waitForApiKey.yml @@ -14,6 +14,8 @@ method: - ruby - scala - swift + x-acl: + - search operationId: waitForApiKey summary: Wait for an API key operation description: Waits for an API key to be added, updated, or deleted. diff --git a/specs/search/helpers/waitForAppTask.yml b/specs/search/helpers/waitForAppTask.yml index 0c904302e98..306645bf789 100644 --- a/specs/search/helpers/waitForAppTask.yml +++ b/specs/search/helpers/waitForAppTask.yml @@ -12,6 +12,8 @@ method: - ruby - scala - swift + x-acl: + - editSettings operationId: waitForAppTask summary: Wait for application-level operation to complete description: Wait for a application-level task to complete. diff --git a/specs/search/helpers/waitForTask.yml b/specs/search/helpers/waitForTask.yml index aa86acfebef..49caf1ebdb1 100644 --- a/specs/search/helpers/waitForTask.yml +++ b/specs/search/helpers/waitForTask.yml @@ -15,6 +15,8 @@ method: - ruby - scala - swift + x-acl: + - addObject operationId: waitForTask summary: Wait for operation to complete description: | diff --git a/specs/search/paths/keys/key.yml b/specs/search/paths/keys/key.yml index d11c26e66e7..6d87bf88d5d 100644 --- a/specs/search/paths/keys/key.yml +++ b/specs/search/paths/keys/key.yml @@ -1,6 +1,8 @@ get: tags: - Api Keys + x-acl: + - search operationId: getApiKey summary: Retrieve API key permissions description: | diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index 2a432a2a919..72b4c295b82 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -1,6 +1,8 @@ post: tags: - Records + x-acl: + - addObject operationId: batch x-mcp-tool: true summary: Batch indexing operations on one index diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index b1349cfe5b8..a1ea0395688 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -1,6 +1,8 @@ post: tags: - Records + x-acl: + - addObject operationId: multipleBatch x-mcp-tool: true description: | diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml index 2b4af21d51c..70fde3aea70 100644 --- a/specs/search/paths/objects/object.yml +++ b/specs/search/paths/objects/object.yml @@ -35,6 +35,7 @@ get: schema: type: object description: The requested record. + x-is-generic: true '400': $ref: '../../../common/responses/BadRequest.yml' '402':