-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add json schema validation for /joke endpoints
- Loading branch information
Matias Schilling
committed
Jun 30, 2024
1 parent
92d5186
commit 6c17932
Showing
7 changed files
with
184 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
chucknorris-integration-test/src/test/resources/schema/joke/by-id/success.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"categories": { | ||
"type": "array", | ||
"items": {} | ||
}, | ||
"created_at": { | ||
"type": "string" | ||
}, | ||
"icon_url": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "string" | ||
}, | ||
"updated_at": { | ||
"type": "string" | ||
}, | ||
"url": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"categories", | ||
"created_at", | ||
"icon_url", | ||
"id", | ||
"updated_at", | ||
"url", | ||
"value" | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
chucknorris-integration-test/src/test/resources/schema/joke/categories/success.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
} |
37 changes: 37 additions & 0 deletions
37
chucknorris-integration-test/src/test/resources/schema/joke/random/success.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"categories": { | ||
"type": "array", | ||
"items": {} | ||
}, | ||
"created_at": { | ||
"type": "string" | ||
}, | ||
"icon_url": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "string" | ||
}, | ||
"updated_at": { | ||
"type": "string" | ||
}, | ||
"url": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"categories", | ||
"created_at", | ||
"icon_url", | ||
"id", | ||
"updated_at", | ||
"url", | ||
"value" | ||
] | ||
} |