()
| 537 | |
| 538 | #[test] |
| 539 | fn test_parse_querystring_parameter() { |
| 540 | let yaml = r#" |
| 541 | openapi: 3.2.0 |
| 542 | info: |
| 543 | title: Test |
| 544 | version: '1.0' |
| 545 | paths: |
| 546 | /test: |
| 547 | get: |
| 548 | parameters: |
| 549 | - name: filter |
| 550 | in: querystring |
| 551 | content: |
| 552 | application/json: |
| 553 | schema: |
| 554 | type: object |
| 555 | responses: |
| 556 | '200': |
| 557 | description: OK |
| 558 | "#; |
| 559 | |
| 560 | let openapi: OpenAPI = OpenAPI::yaml(yaml).unwrap(); |
| 561 | let test_path = openapi.paths.get("/test").unwrap(); |
| 562 | let get_op = test_path.operations.get("get").unwrap(); |
| 563 | let params = get_op.parameters.as_ref().unwrap(); |
| 564 | assert_eq!(params[0].r#in, Some(In::QueryString)); |
| 565 | } |
| 566 | |
| 567 | #[test] |
| 568 | fn test_parse_query_method() { |
nothing calls this directly
no outgoing calls
no test coverage detected