()
| 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#" |
| 2287 | openapi: 3.2.0 |
| 2288 | info: |
| 2289 | title: Test API |
| 2290 | version: '1.0.0' |
| 2291 | paths: |
| 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>> { |
nothing calls this directly
no outgoing calls
no test coverage detected