From c76601496456ac86f5cad96ed21da15510eb8e07 Mon Sep 17 00:00:00 2001 From: "vysakh.menon" Date: Wed, 25 Aug 2021 23:44:56 -0700 Subject: [PATCH 1/4] 8438 cooperativeAssociationType as enum and typo fix --- .../example_data/schema_data.py | 4 ++-- src/registry_schemas/schemas/cooperative.json | 24 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/registry_schemas/example_data/schema_data.py b/src/registry_schemas/example_data/schema_data.py index 6581915..edda6c9 100644 --- a/src/registry_schemas/example_data/schema_data.py +++ b/src/registry_schemas/example_data/schema_data.py @@ -1076,8 +1076,8 @@ 'cooperativeAssociationType': 'CP', 'rulesFileKey': 'cooperative/fa00c6bf-eaad-4a07-a3d2-4786ecd6b83b.jpg', 'rulesFileName': 'rule_file.jpg', - 'memorandomFileKey': 'cooperative/f722bf16-86be-430d-928d-5529853a3a2c.pdf', - 'memorandomFileName': 'memorandom_file.pdf' + 'memorandumFileKey': 'cooperative/f722bf16-86be-430d-928d-5529853a3a2c.pdf', + 'memorandumFileName': 'memorandum_file.pdf' } } diff --git a/src/registry_schemas/schemas/cooperative.json b/src/registry_schemas/schemas/cooperative.json index e19ab76..8d03637 100644 --- a/src/registry_schemas/schemas/cooperative.json +++ b/src/registry_schemas/schemas/cooperative.json @@ -7,13 +7,23 @@ "cooperativeAssociationType", "rulesFileKey", "rulesFileName", - "memorandomFileKey", - "memorandomFileName" + "memorandumFileKey", + "memorandumFileName" ], - "properties": { + "definitions": { "cooperativeAssociationType": { "type": "string", - "title": "The association type for cooperative filing" + "title": "The Association Type of cooperative filing.", + "enum": [ + "CP", + "HC", + "CSC" + ] + } + }, + "properties": { + "cooperativeAssociationType": { + "$ref": "#/definitions/cooperativeAssociationType" }, "rulesFileKey": { "type": "string", @@ -23,11 +33,11 @@ "type": "string", "title": "The file name while uploading" }, - "memorandomFileKey": { + "memorandumFileKey": { "type": "string", - "title": "The Identifier for memorandom file in file server" + "title": "The Identifier for memorandum file in file server" }, - "memorandomFileName": { + "memorandumFileName": { "type": "string", "title": "The file name while uploading" } From 1471a53f590481a11370cfd2efbd352a0f352d30 Mon Sep 17 00:00:00 2001 From: "vysakh.menon" Date: Wed, 25 Aug 2021 23:48:39 -0700 Subject: [PATCH 2/4] version upgrade --- src/registry_schemas/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registry_schemas/version.py b/src/registry_schemas/version.py index 405b38b..313a6e4 100644 --- a/src/registry_schemas/version.py +++ b/src/registry_schemas/version.py @@ -22,4 +22,4 @@ Development release segment: .devN """ -__version__ = '2.15.1' # pylint: disable=invalid-name +__version__ = '2.15.2' # pylint: disable=invalid-name From 7776f0a4fffabcae0c34e3987038ff65baf2089f Mon Sep 17 00:00:00 2001 From: "vysakh.menon" Date: Thu, 26 Aug 2021 00:15:50 -0700 Subject: [PATCH 3/4] no message --- src/registry_schemas/schemas/cooperative.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/registry_schemas/schemas/cooperative.json b/src/registry_schemas/schemas/cooperative.json index 8d03637..28bb52b 100644 --- a/src/registry_schemas/schemas/cooperative.json +++ b/src/registry_schemas/schemas/cooperative.json @@ -10,20 +10,15 @@ "memorandumFileKey", "memorandumFileName" ], - "definitions": { + "properties": { "cooperativeAssociationType": { "type": "string", - "title": "The Association Type of cooperative filing.", + "title": "The association type for cooperative filing", "enum": [ "CP", "HC", "CSC" ] - } - }, - "properties": { - "cooperativeAssociationType": { - "$ref": "#/definitions/cooperativeAssociationType" }, "rulesFileKey": { "type": "string", From 8dc40bddd09d62ce32b7fee1811e4822debbfffb Mon Sep 17 00:00:00 2001 From: "vysakh.menon" Date: Thu, 26 Aug 2021 00:19:03 -0700 Subject: [PATCH 4/4] no message --- src/registry_schemas/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registry_schemas/utils.py b/src/registry_schemas/utils.py index b46d949..e2e94d9 100644 --- a/src/registry_schemas/utils.py +++ b/src/registry_schemas/utils.py @@ -35,7 +35,7 @@ def _load_json_schema(filename: str): relative_path = path.join('schemas', filename) absolute_path = path.join(path.dirname(__file__), relative_path) - with open(absolute_path, 'r') as schema_file: + with open(absolute_path, 'r') as schema_file: # pylint: disable=unspecified-encoding schema = json.loads(schema_file.read()) return schema @@ -54,7 +54,7 @@ def get_schema_store(validate_schema: bool = False, schema_search_path: str = No for fname in fnames: fpath = path.join(schema_search_path, fname) if fpath[-5:] == '.json': - with open(fpath, 'r') as schema_fd: + with open(fpath, 'r') as schema_fd: # pylint: disable=unspecified-encoding schema = json.load(schema_fd) if '$id' in schema: schemastore[schema['$id']] = schema