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

Function test_parse_query_method

examples/openapi_32_features.rs:568–590  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566
567 #[test]
568 fn test_parse_query_method() {
569 let yaml = r#"
570openapi: 3.2.0
571info:
572 title: Test
573 version: '1.0'
574paths:
575 /test:
576 query:
577 summary: Test query
578 responses:
579 '200':
580 description: OK
581 "#;
582
583 let openapi: OpenAPI = OpenAPI::yaml(yaml).unwrap();
584 let test_path = openapi.paths.get("/test").unwrap();
585 assert!(test_path.query.is_some());
586 assert_eq!(
587 test_path.query.as_ref().unwrap().summary.as_ref().unwrap(),
588 "Test query"
589 );
590 }
591}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected