(obj: Any)
| 196 | return {"$ref": "#/components/schemas/Base64String"} |
| 197 | |
| 198 | def _replace_base64(obj: Any) -> Any: |
| 199 | if isinstance(obj, dict): |
| 200 | if ( |
| 201 | obj.get("type") == "string" |
| 202 | and obj.get("contentEncoding") == "base64" |
| 203 | ): |
| 204 | return _make_base64_ref() |
| 205 | return {k: _replace_base64(v) for k, v in obj.items()} |
| 206 | if isinstance(obj, list): |
| 207 | return [_replace_base64(item) for item in obj] |
| 208 | return obj |
| 209 | |
| 210 | for schema_name in list(component_schemas): |
| 211 | if schema_name == "Base64String": |
no test coverage detected
searching dependent graphs…