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

Function test_parse_json_schema_dialect

examples/openapi_31_features.rs:275–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273
274 #[test]
275 fn test_parse_json_schema_dialect() {
276 let yaml = r#"
277openapi: 3.1.0
278jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base
279info:
280 title: Test API
281 version: '1.0.0'
282paths:
283 /test:
284 get:
285 responses:
286 '200':
287 description: OK
288 "#;
289
290 let openapi: OpenAPI = OpenAPI::yaml(yaml).unwrap();
291 assert!(openapi.json_schema_dialect.is_some());
292 assert_eq!(
293 openapi.json_schema_dialect.as_ref().unwrap(),
294 "https://spec.openapis.org/oas/3.1/dialect/base"
295 );
296 }
297}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected