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

Function test_parse_webhooks

examples/openapi_31_features.rs:247–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

245
246 #[test]
247 fn test_parse_webhooks() {
248 let yaml = r#"
249openapi: 3.1.0
250info:
251 title: Test API
252 version: '1.0.0'
253webhooks:
254 testEvent:
255 post:
256 summary: Test webhook
257 responses:
258 '200':
259 description: OK
260paths:
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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected