Skip to content

Commit f150b22

Browse files
committed
Update snapshot
1 parent 18348b4 commit f150b22

1 file changed

Lines changed: 75 additions & 11 deletions

File tree

examples/axum-example/tests/snapshots/integration_test__openapi.snap

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -457,16 +457,28 @@ expression: "std::fs::read_to_string(\"openapi.json\").unwrap()"
457457
"operationId": "mod_file_with_map_query",
458458
"parameters": [
459459
{
460-
"name": "_query",
460+
"name": "name",
461461
"in": "query",
462462
"required": true,
463463
"schema": {
464-
"type": "object",
465-
"properties": {},
466-
"required": [],
467-
"additionalProperties": {
468-
"type": "string"
469-
}
464+
"type": "string"
465+
}
466+
},
467+
{
468+
"name": "age",
469+
"in": "query",
470+
"required": true,
471+
"schema": {
472+
"type": "integer"
473+
}
474+
},
475+
{
476+
"name": "optional_age",
477+
"in": "query",
478+
"required": false,
479+
"schema": {
480+
"type": "integer",
481+
"nullable": true
470482
}
471483
}
472484
],
@@ -484,6 +496,23 @@ expression: "std::fs::read_to_string(\"openapi.json\").unwrap()"
484496
}
485497
}
486498
},
499+
"/no-schema-query": {
500+
"get": {
501+
"operationId": "mod_file_with_no_schema_query",
502+
"responses": {
503+
"200": {
504+
"description": "Successful response",
505+
"content": {
506+
"application/json": {
507+
"schema": {
508+
"type": "string"
509+
}
510+
}
511+
}
512+
}
513+
}
514+
}
515+
},
487516
"/path/prefix/{var}": {
488517
"get": {
489518
"operationId": "prefix_variable",
@@ -570,11 +599,19 @@ expression: "std::fs::read_to_string(\"openapi.json\").unwrap()"
570599
"operationId": "mod_file_with_struct_query",
571600
"parameters": [
572601
{
573-
"name": "query",
602+
"name": "name",
574603
"in": "query",
575604
"required": true,
576605
"schema": {
577-
"$ref": "#/components/schemas/StructQuery"
606+
"type": "string"
607+
}
608+
},
609+
{
610+
"name": "age",
611+
"in": "query",
612+
"required": true,
613+
"schema": {
614+
"type": "integer"
578615
}
579616
}
580617
],
@@ -597,11 +634,19 @@ expression: "std::fs::read_to_string(\"openapi.json\").unwrap()"
597634
"operationId": "mod_file_with_test_struct",
598635
"parameters": [
599636
{
600-
"name": "query",
637+
"name": "name",
601638
"in": "query",
602639
"required": true,
603640
"schema": {
604-
"$ref": "#/components/schemas/TestStruct"
641+
"type": "string"
642+
}
643+
},
644+
{
645+
"name": "age",
646+
"in": "query",
647+
"required": true,
648+
"schema": {
649+
"type": "integer"
605650
}
606651
}
607652
],
@@ -1180,6 +1225,25 @@ expression: "std::fs::read_to_string(\"openapi.json\").unwrap()"
11801225
"value2"
11811226
]
11821227
},
1228+
"MapQuery": {
1229+
"type": "object",
1230+
"properties": {
1231+
"age": {
1232+
"type": "integer"
1233+
},
1234+
"name": {
1235+
"type": "string"
1236+
},
1237+
"optional_age": {
1238+
"type": "integer",
1239+
"nullable": true
1240+
}
1241+
},
1242+
"required": [
1243+
"name",
1244+
"age"
1245+
]
1246+
},
11831247
"SignupRequest": {
11841248
"type": "object",
11851249
"properties": {

0 commit comments

Comments
 (0)