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

Function validate_query_method_recognized

tests/tests.rs:2282–2303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2280
2281 #[test]
2282 fn validate_query_method_recognized() {
2283 use openapi_rs::model::parse::OpenAPI;
2284 use openapi_rs::validator::method;
2285
2286 let content = r#"
2287openapi: 3.2.0
2288info:
2289 title: Test API
2290 version: '1.0.0'
2291paths:
2292 /test:
2293 query:
2294 summary: Query operation
2295 responses:
2296 '200':
2297 description: OK
2298 "#;
2299
2300 let openapi: OpenAPI = OpenAPI::yaml(content).unwrap();
2301 assert!(method("/test", "query", &openapi).is_ok());
2302 assert!(method("/test", "QUERY", &openapi).is_ok());
2303 }
2304
2305 #[test]
2306 fn validate_querystring_parameter_must_be_json() -> Result<(), Box<dyn std::error::Error>> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected