Skip to content

Commit fa8a8e0

Browse files
fix(router): fix openapi and add jsonschema validation (#1578)
1 parent c9f4c1a commit fa8a8e0

File tree

17 files changed

+297
-107
lines changed

17 files changed

+297
-107
lines changed

.github/workflows/tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ jobs:
4141
components: rustfmt, clippy
4242
- name: Install Protoc
4343
uses: arduino/setup-protoc@v1
44+
- name: Clean unused files
45+
run: |
46+
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
47+
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
4448
- name: Install sccache
4549
run: |
4650
curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sccache-v$SCCACHE-x86_64-unknown-linux-musl.tar.gz | tar -xzv --strip-components=1 -C /usr/local/bin sccache-v$SCCACHE-x86_64-unknown-linux-musl/sccache

Cargo.lock

Lines changed: 157 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/openapi.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,57 @@
10221022
}
10231023
}
10241024
},
1025+
"GrammarType": {
1026+
"oneOf": [
1027+
{
1028+
"type": "object",
1029+
"required": [
1030+
"type",
1031+
"value"
1032+
],
1033+
"properties": {
1034+
"type": {
1035+
"type": "string",
1036+
"enum": [
1037+
"json"
1038+
]
1039+
},
1040+
"value": {
1041+
"type": "string",
1042+
"description": "A string that represents a [JSON Schema](https://json-schema.org/).\n\nJSON Schema is a declarative language that allows to annotate JSON documents\nwith types and descriptions.",
1043+
"example": {
1044+
"properties": {
1045+
"location": {
1046+
"type": "string"
1047+
}
1048+
}
1049+
}
1050+
}
1051+
}
1052+
},
1053+
{
1054+
"type": "object",
1055+
"required": [
1056+
"type",
1057+
"value"
1058+
],
1059+
"properties": {
1060+
"type": {
1061+
"type": "string",
1062+
"enum": [
1063+
"regex"
1064+
]
1065+
},
1066+
"value": {
1067+
"type": "string"
1068+
}
1069+
}
1070+
}
1071+
],
1072+
"discriminator": {
1073+
"propertyName": "type"
1074+
}
1075+
},
10251076
"Info": {
10261077
"type": "object",
10271078
"required": [

0 commit comments

Comments
 (0)