{"id":45663,"library":"openapi-downgrade","title":"openapi-downgrade","description":"OpenAPI downgrade converts OpenAPI 3.1.x specifications to 3.0.x while preserving logic. Current version 1.0.1, requires Python >=3.7. Simple CLI and programmatic API.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/RajeshRoy4426/openapi_downgrade_3_0","tags":["openapi","swagger","downgrade","converter"],"install":[{"cmd":"pip install openapi-downgrade","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"YAML parsing and writing","package":"PyYAML","optional":false},{"reason":"Reference resolution","package":"jsonref","optional":false}],"imports":[{"wrong":"from openapi_downgrade.downgrade import downgrade_openapi","symbol":"downgrade_openapi","correct":"from openapi_downgrade import downgrade_openapi"}],"quickstart":{"code":"import yaml\nfrom openapi_downgrade.downgrade import downgrade_openapi\n\nwith open('openapi_3_1.yaml', 'r') as f:\n    spec = yaml.safe_load(f)\n\ndowngraded = downgrade_openapi(spec)\n\nwith open('openapi_3_0.yaml', 'w') as f:\n    yaml.dump(downgraded, f)","lang":"python","description":"Read an OpenAPI 3.1 spec (as Python dict), downgrade to 3.0, write back."},"warnings":[{"fix":"Always manually verify downgraded output, especially for complex specs.","message":"Library may not fully handle all edge cases like webhooks, discriminator mappings, or custom extensions.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Parse YAML/JSON into dict before calling downgrade_openapi.","message":"Input must be a Python dict, not a YAML string. No automatic parsing.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use yaml.dump or json.dump on the returned dict.","message":"Output is a dict; no automatic serialization. You must dump to YAML/JSON yourself.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.1':19 '3.0':12 '3.1':8 '3.7':22 'api':27 'cli':24 'convert':6,31 'current':17 'downgrad':3,5,30 'logic':16 'openapi':2,4,7,28 'openapi-downgrad':1 'preserv':15 'programmat':26 'python':21 'requir':20 'simpl':23 'specif':10 'swagger':29 'version':18 'x':9,13","created_at":"2026-06-07T12:56:07.198095+00:00","updated_at":"2026-06-07T12:56:07.198095+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'downgrade_openapi' from 'openapi_downgrade' (/tmp/tmp2vip4s3v/venv/lib/python3.12/site-packages/openapi_downgrade/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/RajeshRoy4426/openapi_downgrade_3_0","github":"https://github.com/RajeshRoy4426/openapi_downgrade_3_0","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}