diff --git a/storage_service/locations/api/v3/remple/openapi.py b/storage_service/locations/api/v3/remple/openapi.py index a9de43ba2..d0fbe1b71 100644 --- a/storage_service/locations/api/v3/remple/openapi.py +++ b/storage_service/locations/api/v3/remple/openapi.py @@ -175,15 +175,13 @@ def _set_crud_paths(self, paths, resource_name, resource_cls, pk_patt, def _set_search_paths(self, paths, resource_name, resource_cls, pk_patt, rsrc_collection_name): - query_builder = resource_cls._get_query_builder() - pprint.pprint(query_builder.schemata) for action in ('search', 'search_post', 'new_search'): http_method = {'search_post': 'post', 'new_search': 'get'}.get( action, 'search') operation_id = '{}_{}'.format(action, rsrc_collection_name) modifiers = {'search_post': ['search'], 'new_search': ['new_search']}.get( - action, []) + action, []) path = get_collection_targeting_openapi_path( rsrc_collection_name, modifiers=modifiers) path_dict = paths.setdefault(path, {}) @@ -252,59 +250,91 @@ def _get_query_schema_name(self, resource_name): return 'SearchQueryOver{}'.format( self.inflp.plural(resource_name).capitalize()) + def _get_filter_schema_name(self, resource_name): + return 'FilterOver{}'.format( + self.inflp.plural(resource_name).capitalize()) + def _get_new_search_schema_name(self, resource_name): return 'DataForNewSearchOver{}'.format( self.inflp.plural(resource_name).capitalize()) + def _get_related_filter_schema_name(self, resource_name, attribute): + return 'FilterOver{}{}'.format( + self.inflp.plural(resource_name).capitalize(), + attribute.lower().capitalize()) + + def _get_coordinative_filter_schema_name(self, resource_name): + return 'CoordinativeFilterOver{}'.format( + self.inflp.plural(resource_name).capitalize()) + + def _get_negative_filter_schema_name(self, resource_name): + return 'NegativeFilterOver{}'.format( + self.inflp.plural(resource_name).capitalize()) + + def _get_simple_filter_schema_name(self, resource_name): + return 'SimpleFilterOver{}'.format( + self.inflp.plural(resource_name).capitalize()) + # ========================================================================= # Schema path getters # ========================================================================= def _get_read_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_read_schema_name(resource_name)) + return _schema_name2path(self._get_read_schema_name(resource_name)) def _get_mutate_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_mutate_schema_name(resource_name)) + return _schema_name2path(self._get_mutate_schema_name(resource_name)) def _get_edit_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_edit_schema_name(resource_name)) + return _schema_name2path(self._get_edit_schema_name(resource_name)) def _get_paginated_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_paginated_schema_name(resource_name)) + return _schema_name2path(self._get_paginated_schema_name(resource_name)) def _get_new_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_new_schema_name(resource_name)) + return _schema_name2path(self._get_new_schema_name(resource_name)) def _get_search_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_search_schema_name(resource_name)) + return _schema_name2path(self._get_search_schema_name(resource_name)) def _get_query_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_query_schema_name(resource_name)) + return _schema_name2path(self._get_query_schema_name(resource_name)) + + def _get_filter_schema_path(self, resource_name): + return _schema_name2path(self._get_filter_schema_name(resource_name)) + + def _get_coordinative_filter_schema_path(self, resource_name): + return _schema_name2path(self._get_coordinative_filter_schema_name( + resource_name)) + + def _get_negative_filter_schema_path(self, resource_name): + return _schema_name2path(self._get_negative_filter_schema_name( + resource_name)) + + def _get_simple_filter_schema_path(self, resource_name): + return _schema_name2path(self._get_simple_filter_schema_name( + resource_name)) + + def _get_related_filter_schema_path(self, resource_name, attribute): + return _schema_name2path(self._get_related_filter_schema_name( + resource_name, attribute)) + + def _get_related_filter_schema_paths_refs(self, resource_name, + resource_cfg): + return [ + {'$ref': + self._get_related_filter_schema_path(resource_name, attribute)} + for attribute, _ + in self._get_relational_attributes(resource_name, resource_cfg)] def _get_new_search_schema_path(self, resource_name): - return '{}{}'.format( - SCHEMAS_ABS_PATH, - self._get_new_search_schema_name(resource_name)) + return _schema_name2path(self._get_new_search_schema_name(resource_name)) def _get_error_schema_path(self): - return '{}{}'.format(SCHEMAS_ABS_PATH, ERROR_SCHEMA_NAME) + return _schema_name2path(ERROR_SCHEMA_NAME) def _get_paginator_schema_path(self): - return '{}{}'.format(SCHEMAS_ABS_PATH, PAGINATOR_SCHEMA_NAME) + return _schema_name2path(PAGINATOR_SCHEMA_NAME) # ========================================================================= # Response getters @@ -323,7 +353,7 @@ def _get_create_responses(self, resource_name): description='Bad request to create a new {}.'.format( resource_name), ref=self._get_error_schema_path())), - ]) + ]) def _get_delete_responses(self, resource_name): return OrderedDict([ @@ -653,10 +683,16 @@ def _get_schemas(self): read_schema)) schemas[edit_schema_name] = edit_schema if resource_cfg.get('searchable', True): + filter_schemas = ( + self._get_filter_schemas(resource_name, resource_cfg, + read_schema)) + for filter_schema_name, filter_schema in filter_schemas: + schemas[filter_schema_name] = filter_schema query_schema_name, query_schema = ( self._get_query_schema(resource_name, resource_cfg, read_schema)) schemas[query_schema_name] = query_schema + search_schema_name, search_schema = ( self._get_search_schema(resource_name, resource_cfg, read_schema)) @@ -712,19 +748,196 @@ def _get_edit_schema(self, resource_name, resource_cfg, read_schema): ]) return edit_schema_name, edit_schema - def _get_query_schema(self, resource_name, resource_cfg, read_schema): - """TODO/Question: can we describe the query schema better using arrays and oneOf? + def _get_filter_schemas(self, resource_name, resource_cfg, read_schema): + """Each resource will generate multiple filter schemas: a coordinative + one, a negative one, a simple one and zero or more related (relational) + ones, depending on how many other resources (models) it is related to. + This method returns them as a list. + + Note, there is a shorthand filter schema, which is based on arrays and + which is exemplified via the following (and which canNOT be described + using the OpenAPI spec):: + + ["and", [["Location", "purpose", "=", "AS"], + ["Location", "description", "regex", "2018"]]] + ["not", ["Location", "purpose", "=", "AS"]] + ["Location", "purpose", "=", "AS"] + ["Location", "space", "path", "like", "/usr/data/%"] + + Then there is the long-hand filter schema, which is based on objects + and which is exemplified via the following (which CAN be described + using the OpenAPI spec):: + + {"conjunction": "and", + "complement": [ + {"attribute": "purpose", + "relation": "=", + "value": "AS"}, + {"attribute": "description", + "relation": "regex", + "value": "2018"}]} + + {"negator": "not", + "complement": {"attribute": "purpose", + "relation": "=", + "value": "AS"}} + + {"attribute": "purpose", "relation": "=", "value": "AS"} + + {"attribute": "space", + "subattribute": "path", + "relation": "like", + "value": "/usr/data/%"} + + Note that the filter schema is inherently recursive and the Swagger-ui + web app cannot currently fully display a recursive schema. See + https://github.com/swagger-api/swagger-ui/issues/1679. """ - query_schema_name = self._get_query_schema_name(resource_name) - query_schema = OrderedDict([ + return ( + [self._get_simple_filter_schema(resource_name, resource_cfg)] + + self._get_related_filter_schemas(resource_name, resource_cfg) + + [self._get_coordinative_filter_schema(resource_name, resource_cfg), + self._get_negative_filter_schema(resource_name, resource_cfg), + self._get_filter_schema(resource_name, resource_cfg)]) + + def _get_simple_filter_schema(self, resource_name, resource_cfg): + model_name = resource_cfg['resource_cls'].model_cls.__name__ + simple_schema_name = self._get_simple_filter_schema_name(resource_name) + simple_schema = OrderedDict([ ('type', 'object'), ('properties', OrderedDict([ - ('filter', OrderedDict([ - ('type', 'array'), - ('items', OrderedDict([ + ('attribute', OrderedDict([ + ('type', 'string'), + ('enum', self._get_simple_attributes( + model_name, resource_cfg)), + ])), + ('relation', OrderedDict([ + ('type', 'string'), + ('enum', self._get_relations(resource_name, resource_cfg)), + ])), + ('value', {'anyOf': [{'type': 'string'}, + {'type': 'number'}, + {'type': 'boolean'},]}), + ])), + ]) + return simple_schema_name, simple_schema + + def _get_query_schemata(self, resource_cfg): + resource_cls = resource_cfg['resource_cls'] + query_builder = resource_cls._get_query_builder() + return query_builder.schemata + + def _get_relational_attributes(self, resource_name, resource_cfg): + resource_cls = resource_cfg['resource_cls'] + model_name = resource_cfg['resource_cls'].model_cls.__name__ + resource_cls_name = resource_cls.__name__ + query_schemata = self._get_query_schemata(resource_cfg) + return [(attr, cfg.get('foreign_model')) + for attr, cfg in + query_schemata[model_name].items() + if cfg.get('foreign_model')] + + def _get_simple_attributes(self, model_cls_name, resource_cfg): + resource_cls = resource_cfg['resource_cls'] + resource_cls_name = resource_cls.__name__ + query_schemata = self._get_query_schemata(resource_cfg) + return [attr for attr, cfg in + query_schemata[model_cls_name].items() + if not cfg.get('foreign_model')] + + def _get_related_attributes(self, resource_cfg, related_model_name): + query_schemata = self._get_query_schemata(resource_cfg) + return [attr for attr, cfg in query_schemata[related_model_name].items() + if not cfg.get('foreign_model')] + + def _get_relations(self, resource_name, resource_cfg): + resource_cls = resource_cfg['resource_cls'] + query_builder = resource_cls._get_query_builder() + return list(query_builder.relations) + + def _get_related_filter_schemas(self, resource_name, resource_cfg): + schemas = [] + for attribute, related_model_name in self._get_relational_attributes( + resource_name, resource_cfg): + related_schema_name = self._get_related_filter_schema_name( + resource_name, attribute) + related_schema = OrderedDict([ + ('type', 'object'), + ('properties', OrderedDict([ + ('attribute', OrderedDict([ + ('type', 'string'), + ('enum', [attribute]), + ])), + ('subattribute', OrderedDict([ ('type', 'string'), + ('enum', self._get_related_attributes( + resource_cfg, related_model_name)), ])), + ('relation', OrderedDict([ + ('type', 'string'), + ('enum', self._get_relations(resource_name, resource_cfg)), + ])), + ('value', {'anyOf': [{'type': 'string'}, + {'type': 'number'}, + {'type': 'boolean'},]}), + ])), + ]) + schemas.append((related_schema_name, related_schema)) + return schemas + + def _get_coordinative_filter_schema(self, resource_name, resource_cfg): + coord_schema_name = self._get_coordinative_filter_schema_name(resource_name) + coord_schema = OrderedDict([ + ('type', 'object'), + ('properties', OrderedDict([ + ('conjunction', OrderedDict([ + ('type', 'string'), + ('enum', ['and', 'or']), ])), + ('complement', OrderedDict([ + ('type', 'array'), + ('items', {'$ref': + self._get_filter_schema_path(resource_name)}), + ])), + ])), + ]) + return coord_schema_name, coord_schema + + def _get_negative_filter_schema(self, resource_name, resource_cfg): + neg_schema_name = self._get_negative_filter_schema_name(resource_name) + neg_schema = OrderedDict([ + ('type', 'object'), + ('properties', OrderedDict([ + ('negator', OrderedDict([ + ('type', 'string'), + ('enum', ['not']), + ])), + ('complement', + {'$ref': self._get_filter_schema_path(resource_name)}), + ])), + ]) + return neg_schema_name, neg_schema + + def _get_filter_schema(self, resource_name, resource_cfg): + filter_schema_name = self._get_filter_schema_name(resource_name) + filter_schema = { + 'oneOf': [ + {'$ref': self._get_coordinative_filter_schema_path( + resource_name)}, + {'$ref': self._get_negative_filter_schema_path(resource_name)}, + {'$ref': self._get_simple_filter_schema_path(resource_name)}, + ] + self._get_related_filter_schema_paths_refs(resource_name, + resource_cfg) + } + return filter_schema_name, filter_schema + + def _get_query_schema(self, resource_name, resource_cfg, read_schema): + query_schema_name = self._get_query_schema_name(resource_name) + query_schema = OrderedDict([ + ('type', 'object'), + ('properties', OrderedDict([ + ('filter', {'$ref': + self._get_filter_schema_path(resource_name)}), ('order_by', OrderedDict([ ('type', 'array'), ('items', OrderedDict([ @@ -1112,3 +1325,7 @@ def _summarize(action, resource_name, rsrc_collection_name): rsrc_collection_name), ), }[action] + + +def _schema_name2path(schema_name): + return '{}{}'.format(SCHEMAS_ABS_PATH, schema_name) diff --git a/storage_service/locations/api/v3/remple/querybuilder.py b/storage_service/locations/api/v3/remple/querybuilder.py index 7ce86f9bb..27828b8ec 100644 --- a/storage_service/locations/api/v3/remple/querybuilder.py +++ b/storage_service/locations/api/v3/remple/querybuilder.py @@ -616,13 +616,13 @@ def schemata(self): if field_cls_name == 'OneToOneRel': field_name = field.get_accessor_name() field_val = {'foreign_model': field.related_model.__name__, - 'type': 'scalar'} + 'type': 'scalar'} elif field_cls_name in ('ManyToManyField', 'ManyToManyRel', 'ManyToOneRel',): if field_cls_name == 'ManyToOneRel': field_name = field.get_accessor_name() field_val = {'foreign_model': field.related_model.__name__, - 'type': 'collection'} + 'type': 'collection'} model_schema[field_name] = field_val _schemata[model_cls_name] = model_schema self._schemata = _schemata diff --git a/storage_service/locations/management/commands/storage-service-0.11.0-openapi-3.0.0.yml b/storage_service/locations/management/commands/storage-service-0.11.0-openapi-3.0.0.yml index 300ea6cd6..0f39c5288 100644 --- a/storage_service/locations/management/commands/storage-service-0.11.0-openapi-3.0.0.yml +++ b/storage_service/locations/management/commands/storage-service-0.11.0-openapi-3.0.0.yml @@ -241,13 +241,335 @@ components: required: - data - resource - SearchQueryOverLocations: + SimpleFilterOverLocations: type: object properties: - filter: + attribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsMasters: + type: object + properties: + attribute: + type: string + enum: + - masters + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsSpace: + type: object + properties: + attribute: + type: string + enum: + - space + subattribute: + type: string + enum: + - last_verified + - used + - verified + - uuid + - access_protocol + - staging_path + - size + - path + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsLocationpipeline_set: + type: object + properties: + attribute: + type: string + enum: + - locationpipeline_set + subattribute: + type: string + enum: + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsPackage_set: + type: object + properties: + attribute: + type: string + enum: + - package_set + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsReplicators: + type: object + properties: + attribute: + type: string + enum: + - replicators + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsPipeline: + type: object + properties: + attribute: + type: string + enum: + - pipeline + subattribute: + type: string + enum: + - api_key + - uuid + - enabled + - api_username + - remote_name + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverLocations: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverLocations' + NegativeFilterOverLocations: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverLocations' + FilterOverLocations: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverLocations' + - $ref: '#/components/schemas/NegativeFilterOverLocations' + - $ref: '#/components/schemas/SimpleFilterOverLocations' + - $ref: '#/components/schemas/FilterOverLocationsMasters' + - $ref: '#/components/schemas/FilterOverLocationsSpace' + - $ref: '#/components/schemas/FilterOverLocationsLocationpipeline_set' + - $ref: '#/components/schemas/FilterOverLocationsPackage_set' + - $ref: '#/components/schemas/FilterOverLocationsReplicators' + - $ref: '#/components/schemas/FilterOverLocationsPipeline' + SearchQueryOverLocations: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverLocations' order_by: type: array items: @@ -481,13 +803,518 @@ components: required: - data - resource - SearchQueryOverPackages: + SimpleFilterOverPackages: type: object properties: - filter: + attribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesFixitylog_set: + type: object + properties: + attribute: + type: string + enum: + - fixitylog_set + subattribute: + type: string + enum: + - datetime_reported + - error_details + - id + - success + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesOrigin_pipeline: + type: object + properties: + attribute: + type: string + enum: + - origin_pipeline + subattribute: + type: string + enum: + - api_key + - uuid + - enabled + - api_username + - remote_name + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesReplicas: + type: object + properties: + attribute: + type: string + enum: + - replicas + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesEvent_set: + type: object + properties: + attribute: + type: string + enum: + - event_set + subattribute: + type: string + enum: + - status + - user_id + - event_type + - store_data + - status_time + - status_reason + - id + - user_email + - event_reason + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesFile_set: + type: object + properties: + attribute: + type: string + enum: + - file_set + subattribute: + type: string + enum: + - accessionid + - origin + - source_package + - name + - checksum + - stored + - source_id + - id + - uuid + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesReplicated_package: + type: object + properties: + attribute: + type: string + enum: + - replicated_package + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesPointer_file_location: + type: object + properties: + attribute: + type: string + enum: + - pointer_file_location + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesPackagedownloadtask_set: + type: object + properties: + attribute: + type: string + enum: + - packagedownloadtask_set + subattribute: + type: string + enum: + - uuid + - download_completion_time + - downloads_completed + - id + - downloads_attempted + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesCurrent_location: + type: object + properties: + attribute: + type: string + enum: + - current_location + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesRelated_packages: + type: object + properties: + attribute: + type: string + enum: + - related_packages + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverPackages: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverPackages' + NegativeFilterOverPackages: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverPackages' + FilterOverPackages: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverPackages' + - $ref: '#/components/schemas/NegativeFilterOverPackages' + - $ref: '#/components/schemas/SimpleFilterOverPackages' + - $ref: '#/components/schemas/FilterOverPackagesFixitylog_set' + - $ref: '#/components/schemas/FilterOverPackagesOrigin_pipeline' + - $ref: '#/components/schemas/FilterOverPackagesReplicas' + - $ref: '#/components/schemas/FilterOverPackagesEvent_set' + - $ref: '#/components/schemas/FilterOverPackagesFile_set' + - $ref: '#/components/schemas/FilterOverPackagesReplicated_package' + - $ref: '#/components/schemas/FilterOverPackagesPointer_file_location' + - $ref: '#/components/schemas/FilterOverPackagesPackagedownloadtask_set' + - $ref: '#/components/schemas/FilterOverPackagesCurrent_location' + - $ref: '#/components/schemas/FilterOverPackagesRelated_packages' + SearchQueryOverPackages: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverPackages' order_by: type: array items: @@ -614,13 +1441,247 @@ components: required: - data - resource - SearchQueryOverPipelines: + SimpleFilterOverPipelines: type: object properties: - filter: + attribute: + type: string + enum: + - api_key + - uuid + - enabled + - api_username + - remote_name + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesEvent_set: + type: object + properties: + attribute: + type: string + enum: + - event_set + subattribute: + type: string + enum: + - status + - user_id + - event_type + - store_data + - status_time + - status_reason + - id + - user_email + - event_reason + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesLocationpipeline_set: + type: object + properties: + attribute: + type: string + enum: + - locationpipeline_set + subattribute: + type: string + enum: + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesPackage_set: + type: object + properties: + attribute: + type: string + enum: + - package_set + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesLocation: + type: object + properties: + attribute: + type: string + enum: + - location + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverPipelines: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverPipelines' + NegativeFilterOverPipelines: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverPipelines' + FilterOverPipelines: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverPipelines' + - $ref: '#/components/schemas/NegativeFilterOverPipelines' + - $ref: '#/components/schemas/SimpleFilterOverPipelines' + - $ref: '#/components/schemas/FilterOverPipelinesEvent_set' + - $ref: '#/components/schemas/FilterOverPipelinesLocationpipeline_set' + - $ref: '#/components/schemas/FilterOverPipelinesPackage_set' + - $ref: '#/components/schemas/FilterOverPipelinesLocation' + SearchQueryOverPipelines: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverPipelines' order_by: type: array items: @@ -790,13 +1851,582 @@ components: required: - data - resource - SearchQueryOverSpaces: + SimpleFilterOverSpaces: type: object properties: - filter: + attribute: + type: string + enum: + - last_verified + - used + - verified + - uuid + - access_protocol + - staging_path + - size + - path + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesDuracloud: + type: object + properties: + attribute: + type: string + enum: + - duracloud + subattribute: + type: string + enum: + - duraspace + - space + - host + - user + - password + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesLockssomatic: + type: object + properties: + attribute: + type: string + enum: + - lockssomatic + subattribute: + type: string + enum: + - collection_iri + - external_domain + - space + - content_provider_id + - sd_iri + - id + - checksum_type + - au_size + - keep_local + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesFedora: + type: object + properties: + attribute: + type: string + enum: + - fedora + subattribute: + type: string + enum: + - fedora_name + - fedora_password + - fedora_user + - id + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesGpg: + type: object + properties: + attribute: + type: string + enum: + - gpg + subattribute: + type: string + enum: + - id + - key + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesDspace: + type: object + properties: + attribute: + type: string + enum: + - dspace + subattribute: + type: string + enum: + - space + - sd_iri + - metadata_policy + - user + - archive_format + - password + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesNfs: + type: object + properties: + attribute: + type: string + enum: + - nfs + subattribute: + type: string + enum: + - manually_mounted + - space + - remote_path + - version + - remote_name + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesArkivum: + type: object + properties: + attribute: + type: string + enum: + - arkivum + subattribute: + type: string + enum: + - host + - remote_user + - remote_name + - id + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesDataverse: + type: object + properties: + attribute: + type: string + enum: + - dataverse + subattribute: + type: string + enum: + - agent_name + - agent_identifier + - space + - host + - agent_type + - api_key + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesLocation_set: + type: object + properties: + attribute: + type: string + enum: + - location_set + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesLocalfilesystem: + type: object + properties: + attribute: + type: string + enum: + - localfilesystem + subattribute: + type: string + enum: + - id + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesSwift: + type: object + properties: + attribute: + type: string + enum: + - swift + subattribute: + type: string + enum: + - username + - container + - space + - region + - auth_version + - auth_url + - password + - id + - tenant + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesPipelinelocalfs: + type: object + properties: + attribute: + type: string + enum: + - pipelinelocalfs + subattribute: + type: string + enum: + - remote_user + - space + - assume_rsync_daemon + - remote_name + - id + - rsync_password + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverSpaces: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverSpaces' + NegativeFilterOverSpaces: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverSpaces' + FilterOverSpaces: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverSpaces' + - $ref: '#/components/schemas/NegativeFilterOverSpaces' + - $ref: '#/components/schemas/SimpleFilterOverSpaces' + - $ref: '#/components/schemas/FilterOverSpacesDuracloud' + - $ref: '#/components/schemas/FilterOverSpacesLockssomatic' + - $ref: '#/components/schemas/FilterOverSpacesFedora' + - $ref: '#/components/schemas/FilterOverSpacesGpg' + - $ref: '#/components/schemas/FilterOverSpacesDspace' + - $ref: '#/components/schemas/FilterOverSpacesNfs' + - $ref: '#/components/schemas/FilterOverSpacesArkivum' + - $ref: '#/components/schemas/FilterOverSpacesDataverse' + - $ref: '#/components/schemas/FilterOverSpacesLocation_set' + - $ref: '#/components/schemas/FilterOverSpacesLocalfilesystem' + - $ref: '#/components/schemas/FilterOverSpacesSwift' + - $ref: '#/components/schemas/FilterOverSpacesPipelinelocalfs' + SearchQueryOverSpaces: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverSpaces' order_by: type: array items: diff --git a/storage_service/static/openapi/openapispecs/storage-service-0.11.0-openapi-3.0.0.yml b/storage_service/static/openapi/openapispecs/storage-service-0.11.0-openapi-3.0.0.yml index 300ea6cd6..0f39c5288 100644 --- a/storage_service/static/openapi/openapispecs/storage-service-0.11.0-openapi-3.0.0.yml +++ b/storage_service/static/openapi/openapispecs/storage-service-0.11.0-openapi-3.0.0.yml @@ -241,13 +241,335 @@ components: required: - data - resource - SearchQueryOverLocations: + SimpleFilterOverLocations: type: object properties: - filter: + attribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsMasters: + type: object + properties: + attribute: + type: string + enum: + - masters + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsSpace: + type: object + properties: + attribute: + type: string + enum: + - space + subattribute: + type: string + enum: + - last_verified + - used + - verified + - uuid + - access_protocol + - staging_path + - size + - path + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsLocationpipeline_set: + type: object + properties: + attribute: + type: string + enum: + - locationpipeline_set + subattribute: + type: string + enum: + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsPackage_set: + type: object + properties: + attribute: + type: string + enum: + - package_set + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsReplicators: + type: object + properties: + attribute: + type: string + enum: + - replicators + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverLocationsPipeline: + type: object + properties: + attribute: + type: string + enum: + - pipeline + subattribute: + type: string + enum: + - api_key + - uuid + - enabled + - api_username + - remote_name + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverLocations: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverLocations' + NegativeFilterOverLocations: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverLocations' + FilterOverLocations: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverLocations' + - $ref: '#/components/schemas/NegativeFilterOverLocations' + - $ref: '#/components/schemas/SimpleFilterOverLocations' + - $ref: '#/components/schemas/FilterOverLocationsMasters' + - $ref: '#/components/schemas/FilterOverLocationsSpace' + - $ref: '#/components/schemas/FilterOverLocationsLocationpipeline_set' + - $ref: '#/components/schemas/FilterOverLocationsPackage_set' + - $ref: '#/components/schemas/FilterOverLocationsReplicators' + - $ref: '#/components/schemas/FilterOverLocationsPipeline' + SearchQueryOverLocations: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverLocations' order_by: type: array items: @@ -481,13 +803,518 @@ components: required: - data - resource - SearchQueryOverPackages: + SimpleFilterOverPackages: type: object properties: - filter: + attribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesFixitylog_set: + type: object + properties: + attribute: + type: string + enum: + - fixitylog_set + subattribute: + type: string + enum: + - datetime_reported + - error_details + - id + - success + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesOrigin_pipeline: + type: object + properties: + attribute: + type: string + enum: + - origin_pipeline + subattribute: + type: string + enum: + - api_key + - uuid + - enabled + - api_username + - remote_name + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesReplicas: + type: object + properties: + attribute: + type: string + enum: + - replicas + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesEvent_set: + type: object + properties: + attribute: + type: string + enum: + - event_set + subattribute: + type: string + enum: + - status + - user_id + - event_type + - store_data + - status_time + - status_reason + - id + - user_email + - event_reason + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesFile_set: + type: object + properties: + attribute: + type: string + enum: + - file_set + subattribute: + type: string + enum: + - accessionid + - origin + - source_package + - name + - checksum + - stored + - source_id + - id + - uuid + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesReplicated_package: + type: object + properties: + attribute: + type: string + enum: + - replicated_package + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesPointer_file_location: + type: object + properties: + attribute: + type: string + enum: + - pointer_file_location + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesPackagedownloadtask_set: + type: object + properties: + attribute: + type: string + enum: + - packagedownloadtask_set + subattribute: + type: string + enum: + - uuid + - download_completion_time + - downloads_completed + - id + - downloads_attempted + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesCurrent_location: + type: object + properties: + attribute: + type: string + enum: + - current_location + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPackagesRelated_packages: + type: object + properties: + attribute: + type: string + enum: + - related_packages + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverPackages: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverPackages' + NegativeFilterOverPackages: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverPackages' + FilterOverPackages: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverPackages' + - $ref: '#/components/schemas/NegativeFilterOverPackages' + - $ref: '#/components/schemas/SimpleFilterOverPackages' + - $ref: '#/components/schemas/FilterOverPackagesFixitylog_set' + - $ref: '#/components/schemas/FilterOverPackagesOrigin_pipeline' + - $ref: '#/components/schemas/FilterOverPackagesReplicas' + - $ref: '#/components/schemas/FilterOverPackagesEvent_set' + - $ref: '#/components/schemas/FilterOverPackagesFile_set' + - $ref: '#/components/schemas/FilterOverPackagesReplicated_package' + - $ref: '#/components/schemas/FilterOverPackagesPointer_file_location' + - $ref: '#/components/schemas/FilterOverPackagesPackagedownloadtask_set' + - $ref: '#/components/schemas/FilterOverPackagesCurrent_location' + - $ref: '#/components/schemas/FilterOverPackagesRelated_packages' + SearchQueryOverPackages: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverPackages' order_by: type: array items: @@ -614,13 +1441,247 @@ components: required: - data - resource - SearchQueryOverPipelines: + SimpleFilterOverPipelines: type: object properties: - filter: + attribute: + type: string + enum: + - api_key + - uuid + - enabled + - api_username + - remote_name + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesEvent_set: + type: object + properties: + attribute: + type: string + enum: + - event_set + subattribute: + type: string + enum: + - status + - user_id + - event_type + - store_data + - status_time + - status_reason + - id + - user_email + - event_reason + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesLocationpipeline_set: + type: object + properties: + attribute: + type: string + enum: + - locationpipeline_set + subattribute: + type: string + enum: + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesPackage_set: + type: object + properties: + attribute: + type: string + enum: + - package_set + subattribute: + type: string + enum: + - size + - status + - package_type + - uuid + - misc_attributes + - encryption_key_fingerprint + - pointer_file_path + - current_path + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverPipelinesLocation: + type: object + properties: + attribute: + type: string + enum: + - location + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverPipelines: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverPipelines' + NegativeFilterOverPipelines: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverPipelines' + FilterOverPipelines: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverPipelines' + - $ref: '#/components/schemas/NegativeFilterOverPipelines' + - $ref: '#/components/schemas/SimpleFilterOverPipelines' + - $ref: '#/components/schemas/FilterOverPipelinesEvent_set' + - $ref: '#/components/schemas/FilterOverPipelinesLocationpipeline_set' + - $ref: '#/components/schemas/FilterOverPipelinesPackage_set' + - $ref: '#/components/schemas/FilterOverPipelinesLocation' + SearchQueryOverPipelines: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverPipelines' order_by: type: array items: @@ -790,13 +1851,582 @@ components: required: - data - resource - SearchQueryOverSpaces: + SimpleFilterOverSpaces: type: object properties: - filter: + attribute: + type: string + enum: + - last_verified + - used + - verified + - uuid + - access_protocol + - staging_path + - size + - path + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesDuracloud: + type: object + properties: + attribute: + type: string + enum: + - duracloud + subattribute: + type: string + enum: + - duraspace + - space + - host + - user + - password + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesLockssomatic: + type: object + properties: + attribute: + type: string + enum: + - lockssomatic + subattribute: + type: string + enum: + - collection_iri + - external_domain + - space + - content_provider_id + - sd_iri + - id + - checksum_type + - au_size + - keep_local + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesFedora: + type: object + properties: + attribute: + type: string + enum: + - fedora + subattribute: + type: string + enum: + - fedora_name + - fedora_password + - fedora_user + - id + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesGpg: + type: object + properties: + attribute: + type: string + enum: + - gpg + subattribute: + type: string + enum: + - id + - key + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesDspace: + type: object + properties: + attribute: + type: string + enum: + - dspace + subattribute: + type: string + enum: + - space + - sd_iri + - metadata_policy + - user + - archive_format + - password + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesNfs: + type: object + properties: + attribute: + type: string + enum: + - nfs + subattribute: + type: string + enum: + - manually_mounted + - space + - remote_path + - version + - remote_name + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesArkivum: + type: object + properties: + attribute: + type: string + enum: + - arkivum + subattribute: + type: string + enum: + - host + - remote_user + - remote_name + - id + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesDataverse: + type: object + properties: + attribute: + type: string + enum: + - dataverse + subattribute: + type: string + enum: + - agent_name + - agent_identifier + - space + - host + - agent_type + - api_key + - id + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesLocation_set: + type: object + properties: + attribute: + type: string + enum: + - location_set + subattribute: + type: string + enum: + - used + - uuid + - enabled + - quota + - relative_path + - purpose + - id + - description + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesLocalfilesystem: + type: object + properties: + attribute: + type: string + enum: + - localfilesystem + subattribute: + type: string + enum: + - id + - space + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesSwift: + type: object + properties: + attribute: + type: string + enum: + - swift + subattribute: + type: string + enum: + - username + - container + - space + - region + - auth_version + - auth_url + - password + - id + - tenant + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + FilterOverSpacesPipelinelocalfs: + type: object + properties: + attribute: + type: string + enum: + - pipelinelocalfs + subattribute: + type: string + enum: + - remote_user + - space + - assume_rsync_daemon + - remote_name + - id + - rsync_password + relation: + type: string + enum: + - regex + - gt + - like + - '!=' + - '=' + - contains + - ne + - <= + - lt + - '>=' + - lte + - in + - regexp + - exact + - < + - gte + - '>' + value: + anyOf: + - type: string + - type: number + - type: boolean + CoordinativeFilterOverSpaces: + type: object + properties: + conjunction: + type: string + enum: + - and + - or + complement: type: array items: - type: string + $ref: '#/components/schemas/FilterOverSpaces' + NegativeFilterOverSpaces: + type: object + properties: + negator: + type: string + enum: + - not + complement: + $ref: '#/components/schemas/FilterOverSpaces' + FilterOverSpaces: + oneOf: + - $ref: '#/components/schemas/CoordinativeFilterOverSpaces' + - $ref: '#/components/schemas/NegativeFilterOverSpaces' + - $ref: '#/components/schemas/SimpleFilterOverSpaces' + - $ref: '#/components/schemas/FilterOverSpacesDuracloud' + - $ref: '#/components/schemas/FilterOverSpacesLockssomatic' + - $ref: '#/components/schemas/FilterOverSpacesFedora' + - $ref: '#/components/schemas/FilterOverSpacesGpg' + - $ref: '#/components/schemas/FilterOverSpacesDspace' + - $ref: '#/components/schemas/FilterOverSpacesNfs' + - $ref: '#/components/schemas/FilterOverSpacesArkivum' + - $ref: '#/components/schemas/FilterOverSpacesDataverse' + - $ref: '#/components/schemas/FilterOverSpacesLocation_set' + - $ref: '#/components/schemas/FilterOverSpacesLocalfilesystem' + - $ref: '#/components/schemas/FilterOverSpacesSwift' + - $ref: '#/components/schemas/FilterOverSpacesPipelinelocalfs' + SearchQueryOverSpaces: + type: object + properties: + filter: + $ref: '#/components/schemas/FilterOverSpaces' order_by: type: array items: