Skip to content

Commit

Permalink
Merge pull request #169 from fjl/patch-1
Browse files Browse the repository at this point in the history
Improve definition of log filter topic JSON type
  • Loading branch information
lightclient authored Jan 28, 2022
2 parents f731dbf + 3bf2cf7 commit 3a00485
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
32 changes: 24 additions & 8 deletions src/schemas/filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,35 @@
},
"topics": {
"title": "Topics",
"$ref": "#/components/schemas/Topics"
"$ref": "#/components/schemas/FilterTopics"
}
}
},
"Topic": {
"title": "Topic",
"$ref": "#/components/schemas/uint256"
},
"Topics": {
"title": "Topics",
"FilterTopics": {
"title": "Filter Topics",
"type": "array",
"items": {
"$ref": "#/components/schemas/Topic"
"$ref": "#/components/schemas/FilterTopic"
}
},
"FilterTopic": {
"title": "Filter Topic List Entry",
"oneOf": [
{
"title": "Any Topic Match",
"type": "null"
},
{
"title": "Single Topic Match",
"$ref": "#/components/schemas/bytes32"
},
{
"title": "Multiple Topic Match",
"type": "array",
"items": {
"$ref": "#/components/schemas/bytes32"
}
}
]
}
}
5 changes: 4 additions & 1 deletion src/schemas/receipt.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
},
"topics": {
"title": "topics",
"$ref": "#/components/schemas/Topics"
"type": "array",
"items": {
"$ref": "#/components/schemas/bytes32"
}
}
}
},
Expand Down

0 comments on commit 3a00485

Please sign in to comment.