-
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add headers content-type to snapshots
- Loading branch information
1 parent
e352e88
commit dc97291
Showing
7 changed files
with
13 additions
and
6 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
3 changes: 2 additions & 1 deletion
3
tests/controller/snapshots/openapi_spec_[api-docs__openapi.json]@openapi.snap
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
source: tests/controller/openapi.rs | ||
expression: "(res.status().to_string(), res.url().to_string(), res.text().await.unwrap(),)" | ||
expression: "(res.status().to_string(), res.url().to_string(),\nres.headers().get(\"content-type\").unwrap().to_owned(),\nres.text().await.unwrap(),)" | ||
--- | ||
( | ||
"200 OK", | ||
"http://localhost:5555/api-docs/openapi.json", | ||
"application/json", | ||
"{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Loco Demo\",\"description\":\"This app is a kitchensink for various capabilities and examples of the [Loco](https://loco.rs) project.\",\"contact\":{\"name\":\"Dotan Nahum\",\"email\":\"[email protected]\"},\"license\":{\"name\":\"Apache-2.0\"},\"version\":\"0.13.2\"},\"paths\":{\"/album\":{\"get\":{\"operationId\":\"get_action_openapi\",\"responses\":{\"200\":{\"description\":\"Album found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Album\"}}}}}}}},\"components\":{\"schemas\":{\"Album\":{\"type\":\"object\",\"required\":[\"title\",\"rating\"],\"properties\":{\"rating\":{\"type\":\"integer\",\"format\":\"int32\",\"minimum\":0},\"title\":{\"type\":\"string\"}}}},\"securitySchemes\":{\"api_key\":{\"type\":\"apiKey\",\"in\":\"header\",\"name\":\"apikey\"},\"jwt_token\":{\"type\":\"http\",\"scheme\":\"bearer\",\"bearerFormat\":\"JWT\"}}}}", | ||
) |
3 changes: 2 additions & 1 deletion
3
tests/controller/snapshots/openapi_spec_[api-docs__openapi.yaml]@openapi.snap
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
source: tests/controller/openapi.rs | ||
expression: "(res.status().to_string(), res.url().to_string(), res.text().await.unwrap(),)" | ||
expression: "(res.status().to_string(), res.url().to_string(),\nres.headers().get(\"content-type\").unwrap().to_owned(),\nres.text().await.unwrap(),)" | ||
--- | ||
( | ||
"200 OK", | ||
"http://localhost:5555/api-docs/openapi.yaml", | ||
"application/yaml", | ||
"openapi: 3.1.0\ninfo:\n title: Loco Demo\n description: This app is a kitchensink for various capabilities and examples of the [Loco](https://loco.rs) project.\n contact:\n name: Dotan Nahum\n email: [email protected]\n license:\n name: Apache-2.0\n version: 0.13.2\npaths:\n /album:\n get:\n operationId: get_action_openapi\n responses:\n '200':\n description: Album found\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Album'\ncomponents:\n schemas:\n Album:\n type: object\n required:\n - title\n - rating\n properties:\n rating:\n type: integer\n format: int32\n minimum: 0\n title:\n type: string\n securitySchemes:\n api_key:\n type: apiKey\n in: header\n name: apikey\n jwt_token:\n type: http\n scheme: bearer\n bearerFormat: JWT\n", | ||
) |
3 changes: 2 additions & 1 deletion
3
tests/controller/snapshots/openapi_spec_[redoc__openapi.json]@openapi.snap
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
source: tests/controller/openapi.rs | ||
expression: "(res.status().to_string(), res.url().to_string(), res.text().await.unwrap(),)" | ||
expression: "(res.status().to_string(), res.url().to_string(),\nres.headers().get(\"content-type\").unwrap().to_owned(),\nres.text().await.unwrap(),)" | ||
--- | ||
( | ||
"200 OK", | ||
"http://localhost:5555/redoc/openapi.json", | ||
"application/json", | ||
"{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Loco Demo\",\"description\":\"This app is a kitchensink for various capabilities and examples of the [Loco](https://loco.rs) project.\",\"contact\":{\"name\":\"Dotan Nahum\",\"email\":\"[email protected]\"},\"license\":{\"name\":\"Apache-2.0\"},\"version\":\"0.13.2\"},\"paths\":{\"/album\":{\"get\":{\"operationId\":\"get_action_openapi\",\"responses\":{\"200\":{\"description\":\"Album found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Album\"}}}}}}}},\"components\":{\"schemas\":{\"Album\":{\"type\":\"object\",\"required\":[\"title\",\"rating\"],\"properties\":{\"rating\":{\"type\":\"integer\",\"format\":\"int32\",\"minimum\":0},\"title\":{\"type\":\"string\"}}}},\"securitySchemes\":{\"api_key\":{\"type\":\"apiKey\",\"in\":\"header\",\"name\":\"apikey\"},\"jwt_token\":{\"type\":\"http\",\"scheme\":\"bearer\",\"bearerFormat\":\"JWT\"}}}}", | ||
) |
3 changes: 2 additions & 1 deletion
3
tests/controller/snapshots/openapi_spec_[redoc__openapi.yaml]@openapi.snap
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
source: tests/controller/openapi.rs | ||
expression: "(res.status().to_string(), res.url().to_string(), res.text().await.unwrap(),)" | ||
expression: "(res.status().to_string(), res.url().to_string(),\nres.headers().get(\"content-type\").unwrap().to_owned(),\nres.text().await.unwrap(),)" | ||
--- | ||
( | ||
"200 OK", | ||
"http://localhost:5555/redoc/openapi.yaml", | ||
"application/yaml", | ||
"openapi: 3.1.0\ninfo:\n title: Loco Demo\n description: This app is a kitchensink for various capabilities and examples of the [Loco](https://loco.rs) project.\n contact:\n name: Dotan Nahum\n email: [email protected]\n license:\n name: Apache-2.0\n version: 0.13.2\npaths:\n /album:\n get:\n operationId: get_action_openapi\n responses:\n '200':\n description: Album found\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Album'\ncomponents:\n schemas:\n Album:\n type: object\n required:\n - title\n - rating\n properties:\n rating:\n type: integer\n format: int32\n minimum: 0\n title:\n type: string\n securitySchemes:\n api_key:\n type: apiKey\n in: header\n name: apikey\n jwt_token:\n type: http\n scheme: bearer\n bearerFormat: JWT\n", | ||
) |
3 changes: 2 additions & 1 deletion
3
tests/controller/snapshots/openapi_spec_[scalar__openapi.json]@openapi.snap
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
source: tests/controller/openapi.rs | ||
expression: "(res.status().to_string(), res.url().to_string(), res.text().await.unwrap(),)" | ||
expression: "(res.status().to_string(), res.url().to_string(),\nres.headers().get(\"content-type\").unwrap().to_owned(),\nres.text().await.unwrap(),)" | ||
--- | ||
( | ||
"200 OK", | ||
"http://localhost:5555/scalar/openapi.json", | ||
"application/json", | ||
"{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Loco Demo\",\"description\":\"This app is a kitchensink for various capabilities and examples of the [Loco](https://loco.rs) project.\",\"contact\":{\"name\":\"Dotan Nahum\",\"email\":\"[email protected]\"},\"license\":{\"name\":\"Apache-2.0\"},\"version\":\"0.13.2\"},\"paths\":{\"/album\":{\"get\":{\"operationId\":\"get_action_openapi\",\"responses\":{\"200\":{\"description\":\"Album found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Album\"}}}}}}}},\"components\":{\"schemas\":{\"Album\":{\"type\":\"object\",\"required\":[\"title\",\"rating\"],\"properties\":{\"rating\":{\"type\":\"integer\",\"format\":\"int32\",\"minimum\":0},\"title\":{\"type\":\"string\"}}}},\"securitySchemes\":{\"api_key\":{\"type\":\"apiKey\",\"in\":\"header\",\"name\":\"apikey\"},\"jwt_token\":{\"type\":\"http\",\"scheme\":\"bearer\",\"bearerFormat\":\"JWT\"}}}}", | ||
) |
3 changes: 2 additions & 1 deletion
3
tests/controller/snapshots/openapi_spec_[scalar__openapi.yaml]@openapi.snap
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
source: tests/controller/openapi.rs | ||
expression: "(res.status().to_string(), res.url().to_string(), res.text().await.unwrap(),)" | ||
expression: "(res.status().to_string(), res.url().to_string(),\nres.headers().get(\"content-type\").unwrap().to_owned(),\nres.text().await.unwrap(),)" | ||
--- | ||
( | ||
"200 OK", | ||
"http://localhost:5555/scalar/openapi.yaml", | ||
"application/yaml", | ||
"openapi: 3.1.0\ninfo:\n title: Loco Demo\n description: This app is a kitchensink for various capabilities and examples of the [Loco](https://loco.rs) project.\n contact:\n name: Dotan Nahum\n email: [email protected]\n license:\n name: Apache-2.0\n version: 0.13.2\npaths:\n /album:\n get:\n operationId: get_action_openapi\n responses:\n '200':\n description: Album found\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Album'\ncomponents:\n schemas:\n Album:\n type: object\n required:\n - title\n - rating\n properties:\n rating:\n type: integer\n format: int32\n minimum: 0\n title:\n type: string\n securitySchemes:\n api_key:\n type: apiKey\n in: header\n name: apikey\n jwt_token:\n type: http\n scheme: bearer\n bearerFormat: JWT\n", | ||
) |