Registry / devops / openapi-downgrade

openapi-downgrade

JSON →
library1.0.1pypypiunverified

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.

pip install openapi-downgrade
INSTALL
IMPORT
SIG · OPENAPI-DOWNGRADE
O
openapi-downgrade
devopspythonv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

downgrade_openapi
from openapi_downgrade import downgrade_openapi
from openapi_downgrade.downgrade import downgrade_openapi

Read an OpenAPI 3.1 spec (as Python dict), downgrade to 3.0, write back.

import yaml from openapi_downgrade.downgrade import downgrade_openapi with open('openapi_3_1.yaml', 'r') as f: spec = yaml.safe_load(f) downgraded = downgrade_openapi(spec) with open('openapi_3_0.yaml', 'w') as f: yaml.dump(downgraded, f)
Debug
Known issues
gotchaLibrary may not fully handle all edge cases like webhooks, discriminator mappings, or custom extensions.
fix
Always manually verify downgraded output, especially for complex specs.
affects: >=1.0.0
breakingInput must be a Python dict, not a YAML string. No automatic parsing.
fix
Parse YAML/JSON into dict before calling downgrade_openapi.
affects: >=1.0.0
gotchaOutput is a dict; no automatic serialization. You must dump to YAML/JSON yourself.
fix
Use yaml.dump or json.dump on the returned dict.
affects: >=1.0.0
Upgrade
Version history
1.0.1latest on PyPI · released Dec 31, 2025
Audit
Dependencies
PyYAMLrequiredYAML parsing and writing
jsonrefrequiredReference resolution
Agent activity
2 hits · last 30 days
node
2
Resources
openapi-downgrade — pip install openapi-downgrade · libregistry