From d544c168d6d20f4b066067dbd189cc1a5c90b626 Mon Sep 17 00:00:00 2001 From: David Glazer Date: Mon, 25 Feb 2019 16:04:22 -0800 Subject: [PATCH] remove methods that are out of scope for DRS v1 (#233) * remove create/update/delete and version methods * remove calls to Create methods We might want to delete the compliance test completely now that we don't have Create methods, but this should at least get the script to run. * don't test removed methods * remove more tests At this point, it's pretty clear we should rethink testing completely. * trying again to disable tests * remove tests Since they don't make sense now that we only have a read-only API * restore original version * undo edits * comment out tests (instead of deleting them) * remove ListBundles and ListObjects methods --- .travis.yml | 4 +- openapi/data_repository_service.swagger.yaml | 650 ------------------- 2 files changed, 2 insertions(+), 652 deletions(-) diff --git a/.travis.yml b/.travis.yml index e29699bac..0e9ef6f86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ branches: stages: - linting - - test +# - test # The deploy stage only has `deploy` actions which will only run on commits to master # (and not pull requests). That said, we still explicitly skip this stage because # if we don't, Travis will only stop execution once the build stage has already been @@ -78,5 +78,5 @@ before_install: script: - make schemas -- nosetests python/ +#- nosetests python/ - ga4gh_drs_client diff --git a/openapi/data_repository_service.swagger.yaml b/openapi/data_repository_service.swagger.yaml index 4f9c0cbcd..fc70fa2a7 100644 --- a/openapi/data_repository_service.swagger.yaml +++ b/openapi/data_repository_service.swagger.yaml @@ -31,110 +31,6 @@ paths: tags: - DataRepositoryService x-swagger-router-controller: ga4gh.drs.server - /bundles: - post: - summary: Create a new Data Bundle - operationId: CreateBundle - responses: - '200': - description: The Data Bundle was successfully created. - schema: - $ref: '#/definitions/CreateBundleResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: body - in: body - required: true - schema: - $ref: '#/definitions/CreateBundleRequest' - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - get: - summary: List the Data Bundles - operationId: ListBundles - responses: - '200': - description: 'Successfully listed Data Bundles.' - schema: - $ref: '#/definitions/ListBundlesResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: alias - in: query - type: string - required: false - description: |- - If provided returns Data Bundles that have any alias that matches the - request. - - name: checksum - in: query - type: string - required: false - description: |- - The hexlified checksum that one would like to match on. - - name: checksum_type - in: query - type: string - required: false - description: |- - If provided will restrict responses to those that match the provided - type. - - possible values: - md5 # most blob stores provide a checksum using this - multipart-md5 # multipart uploads provide a specialized tag in S3 - sha256 - sha512 - - name: page_size - in: query - type: integer - format: int32 - required: false - description: |- - Specifies the maximum number of results to return in a single page. - If unspecified, a system default will be used. - - name: page_token - type: string - in: query - required: false - description: |- - The continuation token, which is used to page through large result sets. - To get the next page of results, set this parameter to the value of - `next_page_token` from the previous response. - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server '/bundles/{bundle_id}': get: summary: Retrieve a Data Bundle @@ -169,222 +65,6 @@ paths: in: path required: true type: string - - name: version - required: false - description: |- - If provided will return the requested version of the selected Data Bundle. - Otherwise, only the latest version is returned. - in: query - type: string - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - delete: - summary: Delete a Data Bundle - operationId: DeleteBundle - responses: - '200': - description: '' - schema: - $ref: '#/definitions/DeleteBundleResponse' - parameters: - - name: bundle_id - in: path - required: true - type: string - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - put: - summary: Update a Data Bundle - operationId: UpdateBundle - responses: - '200': - description: The Data Bundle was updated successfully. - schema: - $ref: '#/definitions/UpdateBundleResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: The requested Data Bundle wasn't found. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: bundle_id - in: path - required: true - type: string - description: The ID of the Data Bundle to update - - name: body - in: body - required: true - description: The new content for the Data Bundle identified by the given bundle_id. If the ID specified in the request body is different than that specified in the path, the Data Bundle's ID will be replaced with the one in the request body. - schema: - $ref: '#/definitions/UpdateBundleRequest' - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - '/bundles/{bundle_id}/versions': - get: - operationId: GetBundleVersions - summary: Retrieve all versions of a Data Bundle - responses: - '200': - description: The versions for the Data Bundle were found successfully. - schema: - $ref: '#/definitions/GetBundleVersionsResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: The requested Data Bundle wasn't found. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: bundle_id - in: path - required: true - type: string - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - /objects: - post: - summary: Make a new Data Object - operationId: CreateObject - responses: - '200': - description: Successfully created the Data Object. - schema: - $ref: '#/definitions/CreateObjectResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: body - in: body - required: true - description: |- - The Data Object to be created. The ID scheme is left up to the - implementor but should be unique to the server instance. - schema: - $ref: '#/definitions/CreateObjectRequest' - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - get: - summary: List the Data Objects - operationId: ListObjects - responses: - '200': - description: The Data Objects were listed successfully. - schema: - $ref: '#/definitions/ListObjectsResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: alias - in: query - type: string - required: false - description: |- - If provided will only return Data Objects with the given alias. - - name: url - in: query - type: string - required: false - description: |- - If provided will return only Data Objects with a that URL matches - this string. - - name: checksum - in: query - type: string - required: false - description: |- - The hexlified checksum that one would like to match on. - - name: checksum_type - in: query - type: string - required: false - description: |- - If provided will restrict responses to those that match the provided - type. - - possible values: - md5 # most blob stores provide a checksum using this - multipart-md5 # multipart uploads provide a specialized tag in S3 - sha256 - sha512 - - name: page_size - in: query - type: integer - format: int32 - required: false - description: |- - Specifies the maximum number of results to return in a single page. - If unspecified, a system default will be used. - - name: page_token - in: query - type: string - required: false - description: |- - The continuation token, which is used to page through large result sets. - To get the next page of results, set this parameter to the value of - `next_page_token` from the previous response. tags: - DataRepositoryService x-swagger-router-controller: ga4gh.drs.server @@ -417,128 +97,6 @@ paths: description: An unexpected error occurred. schema: $ref: '#/definitions/ErrorResponse' - parameters: - - name: object_id - in: path - required: true - type: string - - name: version - required: false - description: |- - If provided will return the requested version of the selected Data Object. - in: query - type: string - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - delete: - summary: Delete a Data Object index entry - operationId: DeleteObject - responses: - '200': - description: 'The Data Object was deleted successfully.' - schema: - $ref: '#/definitions/DeleteObjectResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: The requested Data Object wasn't found. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: object_id - in: path - required: true - type: string - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - put: - summary: Update a Data Object - operationId: UpdateObject - responses: - '200': - description: The Data Object was successfully updated. - schema: - $ref: '#/definitions/UpdateObjectResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: The requested Data Object wasn't found. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' - parameters: - - name: object_id - in: path - required: true - type: string - description: The ID of the Data Object to update - - name: body - in: body - required: true - description: The new Data Object for the given object_id. If the ID specified in the request body is different than that specified in the path, the Data Object's ID will be replaced with the one in the request body. - schema: - $ref: '#/definitions/UpdateObjectRequest' - tags: - - DataRepositoryService - x-swagger-router-controller: ga4gh.drs.server - '/objects/{object_id}/versions': - get: - summary: Retrieve all versions of a Data Object - operationId: GetObjectVersions - responses: - '200': - description: The versions for the Data Object were returned successfully. - schema: - $ref: '#/definitions/GetObjectVersionsResponse' - '400': - description: The request is malformed. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: The request is unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: The requested Data Object wasn't found. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: The requester is not authorized to perform this action. - schema: - $ref: '#/definitions/ErrorResponse' - '500': - description: An unexpected error occurred. - schema: - $ref: '#/definitions/ErrorResponse' parameters: - name: object_id in: path @@ -598,36 +156,6 @@ definitions: multipart-md5 # multipart uploads provide a specialized tag in S3 sha256 sha512 - CreateBundleRequest: - type: object - properties: - bundle: - $ref: '#/definitions/Bundle' - CreateBundleResponse: - type: object - required: ['bundle_id'] - properties: - bundle_id: - type: string - description: |- - The identifier of the Data Bundle created. - CreateObjectRequest: - type: object - required: ['object'] - properties: - object: - $ref: '#/definitions/Object' - description: |- - The Data Object one would like to index. One must provide any aliases - and URLs to this file when sending the CreateObjectRequest. It is up - to implementations to validate that the Data Object is available from - the provided URLs. - CreateObjectResponse: - type: object - properties: - object_id: - type: string - description: The ID of the created Data Object. Bundle: type: object required: ['id', 'object_ids', 'created', 'updated', 'version', 'checksums'] @@ -743,167 +271,17 @@ definitions: These aliases can be used to represent the Data Object's location in a directory (e.g. "bucket/folder/file.name") to make Data Objects more discoverable. They might also be used to represent - DeleteBundleResponse: - type: object - properties: - bundle_id: - type: string - DeleteObjectResponse: - type: object - required: ['object_id'] - properties: - object_id: - type: string - description: |- - The identifier of the Data Object deleted. GetBundleResponse: type: object properties: bundle: $ref: '#/definitions/Bundle' - GetBundleVersionsResponse: - type: object - required: ['bundles'] - properties: - bundles: - type: array - items: - $ref: '#/definitions/Bundle' - description: |- - All versions of the Data Bundles that match the GetBundleVersions - request. GetObjectResponse: type: object required: ['object'] properties: object: $ref: '#/definitions/Object' - GetObjectVersionsResponse: - type: object - required: ['objects'] - properties: - objects: - type: array - items: - $ref: '#/definitions/Object' - description: |- - All versions of the Data Objects that match the GetObjectVersions - request. - ListBundlesRequest: - description: |- - Only return Data Bundles that match all of the request parameters. A - page_size and page_token are provided for retrieving a large number of - results. - type: object - properties: - alias: - type: string - description: |- - If provided returns Data Bundles that have any alias that matches the - request. - checksum: - type: string - description: |- - The hexlified checksum that one would like to match on. - checksum_type: - type: string - description: |- - If provided will restrict responses to those that match the provided - type. - - possible values: - md5 # most blob stores provide a checksum using this - multipart-md5 # multipart uploads provide a specialized tag in S3 - sha256 - sha512 - page_size: - type: integer - format: int32 - description: |- - Specifies the maximum number of results to return in a single page. - If unspecified, a system default will be used. - page_token: - type: string - description: |- - The continuation token, which is used to page through large result sets. - To get the next page of results, set this parameter to the value of - `next_page_token` from the previous response. - ListBundlesResponse: - type: object - description: |- - A list of Data Bundles matching the request parameters and a continuation - token that can be used to retrieve more results. - properties: - bundles: - type: array - items: - $ref: '#/definitions/Bundle' - description: The list of Data Bundles. - next_page_token: - type: string - description: |- - The continuation token, which is used to page through large result sets. - Provide this value in a subsequent request to return the next page of - results. This field will be empty if there aren't any additional results. - ListObjectsRequest: - type: object - properties: - alias: - type: string - description: |- - If provided will only return Data Objects with the given alias. - url: - type: string - description: |- - If provided will return only Data Objects with a that URL matches - this string. - checksum: - type: string - description: |- - The hexlified checksum that one would like to match on. - checksum_type: - type: string - description: |- - If provided will restrict responses to those that match the provided - type. - - possible values: - md5 # most blob stores provide a checksum using this - multipart-md5 # multipart uploads provide a specialized tag in S3 - sha256 - sha512 - page_size: - type: integer - format: int32 - description: |- - Specifies the maximum number of results to return in a single page. - If unspecified, a system default will be used. - page_token: - type: string - description: |- - The continuation token, which is used to page through large result sets. - To get the next page of results, set this parameter to the value of - `next_page_token` from the previous response. - description: |- - Allows a requester to list and filter Data Objects. Only Data Objects - matching all of the requested parameters will be returned. - ListObjectsResponse: - type: object - properties: - objects: - type: array - items: - $ref: '#/definitions/Object' - description: The list of Data Objects. - next_page_token: - type: string - description: |- - The continuation token, which is used to page through large result sets. - Provide this value in a subsequent request to return the next page of - results. This field will be empty if there aren't any additional results. - description: |- - A list of Data Objects matching the requested parameters, and a paging - token, that can be used to retrieve more results. URL: type: object required: ['url'] @@ -918,34 +296,6 @@ definitions: $ref: '#/definitions/UserMetadata' authorization_metadata: $ref: '#/definitions/AuthorizationMetadata' - UpdateBundleRequest: - type: object - required: ['bundle'] - properties: - bundle: - $ref: '#/definitions/Bundle' - UpdateBundleResponse: - type: object - required: ['bundle_id'] - properties: - bundle_id: - type: string - description: |- - The identifier of the Data Bundle updated. - UpdateObjectRequest: - type: object - required: ['object'] - properties: - object: - $ref: '#/definitions/Object' - UpdateObjectResponse: - type: object - required: ['object_id'] - properties: - object_id: - type: string - description: |- - The identifier of the Data Object updated. ErrorResponse: description: An object that can optionally include information about the error.