()
| 245 | |
| 246 | #[test] |
| 247 | fn test_parse_webhooks() { |
| 248 | let yaml = r#" |
| 249 | openapi: 3.1.0 |
| 250 | info: |
| 251 | title: Test API |
| 252 | version: '1.0.0' |
| 253 | webhooks: |
| 254 | testEvent: |
| 255 | post: |
| 256 | summary: Test webhook |
| 257 | responses: |
| 258 | '200': |
| 259 | description: OK |
| 260 | paths: |
| 261 | /test: |
| 262 | get: |
| 263 | responses: |
| 264 | '200': |
| 265 | description: OK |
| 266 | "#; |
| 267 | |
| 268 | let openapi: OpenAPI = OpenAPI::yaml(yaml).unwrap(); |
| 269 | assert!(openapi.webhooks.is_some()); |
| 270 | assert_eq!(openapi.webhooks.as_ref().unwrap().len(), 1); |
| 271 | assert!(openapi.is_31()); |
| 272 | } |
| 273 | |
| 274 | #[test] |
| 275 | fn test_parse_json_schema_dialect() { |
nothing calls this directly
no outgoing calls
no test coverage detected