Merge pull request #1403 from appwrite/fix-db-open-api-spec

fix-db-open-api-spec
This commit is contained in:
Eldad A. Fux 2021-07-19 17:49:15 +03:00 committed by GitHub
commit 285cc76212
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -299,7 +299,7 @@ App::post('/v1/database/collections/:collectionId/attributes')
$response->dynamic2($attribute, Response::MODEL_ATTRIBUTE); $response->dynamic2($attribute, Response::MODEL_ATTRIBUTE);
}); });
App::get('v1/database/collections/:collectionId/attributes') App::get('/v1/database/collections/:collectionId/attributes')
->desc('List Attributes') ->desc('List Attributes')
->groups(['api', 'database']) ->groups(['api', 'database'])
->label('scope', 'attributes.read') ->label('scope', 'attributes.read')
@ -337,13 +337,13 @@ App::get('v1/database/collections/:collectionId/attributes')
]), Response::MODEL_ATTRIBUTE_LIST); ]), Response::MODEL_ATTRIBUTE_LIST);
}); });
App::get('v1/database/collections/:collectionId/attributes/:attributeId') App::get('/v1/database/collections/:collectionId/attributes/:attributeId')
->desc('Get Attribute') ->desc('Get Attribute')
->groups(['api', 'database']) ->groups(['api', 'database'])
->label('scope', 'attributes.read') ->label('scope', 'attributes.read')
->label('sdk.namespace', 'database') ->label('sdk.namespace', 'database')
->label('sdk.platform', [APP_PLATFORM_SERVER]) ->label('sdk.platform', [APP_PLATFORM_SERVER])
->label('sdk.method', 'listAttributes') ->label('sdk.method', 'getAttribute')
->label('sdk.description', '/docs/references/database/get-attribute.md') ->label('sdk.description', '/docs/references/database/get-attribute.md')
->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
@ -530,7 +530,7 @@ App::post('/v1/database/collections/:collectionId/indexes')
}); });
App::get('v1/database/collections/:collectionId/indexes') App::get('/v1/database/collections/:collectionId/indexes')
->desc('List Indexes') ->desc('List Indexes')
->groups(['api', 'database']) ->groups(['api', 'database'])
->label('scope', 'indexes.read') ->label('scope', 'indexes.read')
@ -568,13 +568,13 @@ App::get('v1/database/collections/:collectionId/indexes')
]), Response::MODEL_INDEX_LIST); ]), Response::MODEL_INDEX_LIST);
}); });
App::get('v1/database/collections/:collectionId/indexes/:indexId') App::get('/v1/database/collections/:collectionId/indexes/:indexId')
->desc('Get Index') ->desc('Get Index')
->groups(['api', 'database']) ->groups(['api', 'database'])
->label('scope', 'indexes.read') ->label('scope', 'indexes.read')
->label('sdk.namespace', 'database') ->label('sdk.namespace', 'database')
->label('sdk.platform', [APP_PLATFORM_SERVER]) ->label('sdk.platform', [APP_PLATFORM_SERVER])
->label('sdk.method', 'listIndexes') ->label('sdk.method', 'getIndex')
->label('sdk.description', '/docs/references/database/get-index.md') ->label('sdk.description', '/docs/references/database/get-index.md')
->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON)