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

Fix integration testing #452

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 3 additions & 2 deletions cedar-lean/DiffTest/Parser.lean
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,11 @@ partial def jsonToEntityTypeEntry (json : Lean.Json) : ParseResult JsonEntitySch
let descendants_json ← getJsonField json "descendants" >>= jsonToArray
let descendants ← List.mapM jsonToName descendants_json.toList
let attrs ← getJsonField json "attributes" >>= (getJsonField · "attrs") >>= jsonToRecordType
let tags ← -- the "tags" field may be absent
let tags ← -- the "tags" field must be present
match getJsonField json "tags" with
| .ok .null => .ok .none
| .ok jty => (jsonToCedarType jty).map .some
| .error _ => .ok .none
| _ => .error "`tags` field must exist"
.ok {
descendants := Set.make descendants,
attrs := attrs,
Expand Down
Loading