(ref: str, schemas: dict[str, typing.Any])
| 69 | |
| 70 | |
| 71 | def resolve_ref(ref: str, schemas: dict[str, typing.Any]) -> dict[str, typing.Any]: |
| 72 | if not ref.startswith(_OPENAPI_REF_PREFIX): |
| 73 | raise OpenApiCompatError(f"Unsupported ref format: {ref}") |
| 74 | schema_name = ref[len(_OPENAPI_REF_PREFIX):] |
| 75 | if schema_name not in schemas: |
| 76 | raise OpenApiCompatError(f"Missing schema for ref: {ref}") |
| 77 | return schemas[schema_name] |
| 78 | |
| 79 | |
| 80 | def _type_signature( |
no test coverage detected