Skip to content

Commit 8e0e6e9

Browse files
committed
deprecated: Check refs too
#185 (comment) #372
1 parent 30f3a78 commit 8e0e6e9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99
### Fixed
1010

1111
- use-titles: Use $ref'erring title if available https://github.com/OpenDataServices/flatten-tool/pull/368
12+
- create-template --no-deprecated-fields: Did not work if deprecated element at same level as a $ref https://github.com/OpenDataServices/flatten-tool/issues/185#issuecomment-719587348
1213

1314
## [0.15.2] - 2020-10-29
1415

flattentool/schema.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,13 @@ def parse_schema_dict(
243243
):
244244
continue
245245

246+
if (
247+
self.exclude_deprecated_fields
248+
and hasattr(property_schema_dict, "__reference__")
249+
and property_schema_dict.__reference__.get("deprecated")
250+
):
251+
continue
252+
246253
property_type_set = get_property_type_set(property_schema_dict)
247254

248255
if (

0 commit comments

Comments
 (0)