MCPcopy Create free account
hub / github.com/baerwang/openapi-rs / test_parse_querystring_parameter

Function test_parse_querystring_parameter

examples/openapi_32_features.rs:539–565  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

537
538 #[test]
539 fn test_parse_querystring_parameter() {
540 let yaml = r#"
541openapi: 3.2.0
542info:
543 title: Test
544 version: '1.0'
545paths:
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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected