Skip to content

Commit

Permalink
Test serving schemas that end with .schema.json (#43)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Nov 14, 2024
1 parent ecef8ad commit 2e982fe
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/e2e/common/get.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ Link: <http://json-schema.org/draft-07/schema\#>; rel="describedby"
"$id": "{{base}}/example/v2.0/schema.json",
"type": "integer"
}

# .schema.json extension
GET {{base}}/example/extension/with.schema.json
HTTP 200
Content-Type: application/schema+json
Link: <http://json-schema.org/draft-07/schema\#>; rel="describedby"
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "{{base}}/example/extension/with.schema.json",
"type": "string"
}
4 changes: 4 additions & 0 deletions test/sandbox/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"url": "http://localhost:8000",
"port": 8000,
"collections": {
"example/extension": {
"base": "https://example.com/extension",
"path": "./schemas/example/extension"
},
"example/schemas": {
"base": "https://example.com/schemas",
"path": "./schemas/example/folder"
Expand Down
2 changes: 2 additions & 0 deletions test/sandbox/manifest-ce.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
./schemas/example
./schemas/example/bundling
./schemas/example/bundling/single.json
./schemas/example/extension
./schemas/example/extension/with.schema.json
./schemas/example/schemas
./schemas/example/schemas/string.json
./schemas/example/v2.0
Expand Down
3 changes: 3 additions & 0 deletions test/sandbox/manifest-ee.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
./schemas/example/bundling
./schemas/example/bundling/.meta.json
./schemas/example/bundling/single.json
./schemas/example/extension
./schemas/example/extension/.meta.json
./schemas/example/extension/with.schema.json
./schemas/example/schemas
./schemas/example/schemas/.meta.json
./schemas/example/schemas/string.json
Expand Down
5 changes: 5 additions & 0 deletions test/sandbox/schemas/example/extension/with.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/extension/with.schema.json",
"type": "string"
}

0 comments on commit 2e982fe

Please sign in to comment.