Skip to content

Commit

Permalink
Merge pull request #53 from vysakh-menon-aot/feature/6256
Browse files Browse the repository at this point in the history
6256 businessId (identifier) changed type from int to string
  • Loading branch information
vysakh-menon-aot authored Feb 2, 2021
2 parents ad73f34 + 5e5422d commit 09e8820
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/registry_schemas/example_data/schema_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,9 @@

COMMENT_BUSINESS = {
'comment': {
'businessId': 1,
'businessId': 'CP151151',
'comment': 'This is a comment on a business.',
'timestamp': '2020-02-10T20:05:49.068272+00:00',
'submitterId': 1
'timestamp': '2020-02-10T20:05:49.068272+00:00'
}
}

Expand Down
16 changes: 11 additions & 5 deletions src/registry_schemas/schemas/comment.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,28 @@
]
},
"businessId": {
"type": "integer",
"title": "The id of the business.",
"type": "string",
"title": "The identifier of the business.",
"examples": [
151
"CP151151"
]
},
"submitterDisplayName": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"title": "Display name of submitter. May be null if not suitable for public view.",
"examples": [
"Joe Fresh",
"joefresh"
]
},
"timestamp": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time",
"title": "The timestamp of the comment",
"examples": [
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.11.1' # pylint: disable=invalid-name
__version__ = '2.11.2' # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion tests/unit/test_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_valid_no_timestamp():
def test_invalid_filing_and_business_id():
"""Assert that schema fails with both filing and business id set."""
comment = copy.deepcopy(COMMENT_FILING)
comment['comment']['businessId'] = 1
comment['comment']['businessId'] = 'CP151151'
is_valid, errors = validate(comment, 'comment')

if errors:
Expand Down

0 comments on commit 09e8820

Please sign in to comment.