Skip to content

Commit

Permalink
Merge pull request #69 from vysakh-menon-aot/feature/8438-update
Browse files Browse the repository at this point in the history
8438 cooperativeAssociationType as enum and typo fix
  • Loading branch information
thorwolpert authored Aug 31, 2021
2 parents 161288e + 8dc40bd commit c922a10
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/registry_schemas/example_data/schema_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
17 changes: 11 additions & 6 deletions src/registry_schemas/schemas/cooperative.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
"cooperativeAssociationType",
"rulesFileKey",
"rulesFileName",
"memorandomFileKey",
"memorandomFileName"
"memorandumFileKey",
"memorandumFileName"
],
"properties": {
"cooperativeAssociationType": {
"type": "string",
"title": "The association type for cooperative filing"
"title": "The association type for cooperative filing",
"enum": [
"CP",
"HC",
"CSC"
]
},
"rulesFileKey": {
"type": "string",
Expand All @@ -23,11 +28,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"
}
Expand Down
4 changes: 2 additions & 2 deletions src/registry_schemas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/registry_schemas/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
Development release segment: .devN
"""

__version__ = '2.15.1' # pylint: disable=invalid-name
__version__ = '2.15.2' # pylint: disable=invalid-name

0 comments on commit c922a10

Please sign in to comment.