-
LucyBot api-spec-converter (online version, GitHub repo, Node.js module) can convert from OpenAPI 3.0 to 2.0.
-
API Transformer (paid service) also claims to be able to convert OpenAPI 3.0 back to OpenAPI 2.0. It has a command-line version too.
Keep in mind that OAS3→OAS2 convertion is lossy in general, because OAS3 has features that did not exist in OAS2 (such as multiple servers, oneOf
/anyOf
, different schemas per media type, objects in query string parameters, cookie parameters, and others).