Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21.dockter.4 #37

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [0.2.5] - 2024-05-10

### Added in 0.2.5

- SzDiagnosticGetDatastoreInfoResponse
- SzDiagnosticGetFeatureResponse
- SzEngineFindInterestingEntitiesByEntityIdResponse
- SzEngineFindInterestingEntitiesByRecordIdResponse
- SzEngineWhyRecordInEntityResponse

### Changed in 0.2.5

- SzConfigExportConfigResponse
- SzDiagnosticCheckDatastorePerformanceResponse

### Removed in 0.2.5

- SzEngineReplaceRecordResponse

## [0.2.4] - 2024-04-02

### Changed in 0.2.4
Expand Down
17 changes: 16 additions & 1 deletion bin/analyze_rfc8927.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
GLOBAL_KEY_TYPE = {}
GLOBAL_OUT_OF_ORDER = []
GLOBAL_REFS = []
GLOBAL_JSON_KEYS = []
BLACK_LIST = [
"description",
"elements",
Expand Down Expand Up @@ -87,6 +88,7 @@ def recurse(prefix, list_to_check):
add_to_key_count(key_to_check)
add_to_key_type(key_to_check, value_to_check)
if isinstance(value_to_check, dict):
GLOBAL_JSON_KEYS.append(key_to_check)
recurse("{0}.{1}".format(prefix, key_to_check), value_to_check)


Expand Down Expand Up @@ -165,13 +167,26 @@ def search_list(search_term):
if len(value) > 1:
print("{0:30s} {1}".format(key, sorted(value)))

# Print missing JSON keys that have a ref:

print("")
print("-" * 80)
print("\nTEST 5: Refs without JSON keys.\n")

MISSING_REF_COUNT = 0
for value in GLOBAL_REFS:
if value not in GLOBAL_JSON_KEYS:
MISSING_REF_COUNT += 1
print("Missing:", value)
if MISSING_REF_COUNT == 0:
print("No missing JSON keys")

# Print result of test for similar lists.
# Must be done last as it mutates GLOBAL_KEYS

print("")
print("-" * 80)
print("\nTEST 5: Detect JSON keys not used.\n")
print("\nTEST 6: Detect JSON keys not used.\n")

definitions = GLOBAL_KEYS.pop("definitions")
for key, values in GLOBAL_KEYS.items():
Expand Down
Loading