Skip to content

Commit

Permalink
chore: dry schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mfw78 committed Jan 17, 2024
1 parent 3263da1 commit c064848
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
}
}
]
}
}
35 changes: 15 additions & 20 deletions src/types/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,18 @@
"type": "object",
"properties": {
"defaultAction": {
"type": "string",
"enum": [
"ACCEPT",
"DROP",
"SKIP"
]
"$ref": "#/$defs/filterAction"
},
"owners": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"ACCEPT",
"DROP",
"SKIP"
]
"$ref": "#/$defs/filterAction"
}
},
"handlers": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"ACCEPT",
"DROP",
"SKIP"
]
"$ref": "#/$defs/filterAction"
}
}
},
Expand All @@ -80,5 +65,15 @@
"required": [
"networks"
],
"additionalProperties": false
}
"additionalProperties": false,
"$defs": {
"filterAction": {
"type": "string",
"enum": [
"ACCEPT",
"DROP",
"SKIP"
]
}
}
}

0 comments on commit c064848

Please sign in to comment.