mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 10:33:44 +03:00
Make conversion process more robust
This commit is contained in:
parent
11387ede80
commit
86a7405ebf
|
@ -18,7 +18,7 @@ export async function loadAndBundleSpec(specUrlOrObject: object | string): Promi
|
|||
export function convertSwagger2OpenAPI(spec: any): Promise<OpenAPISpec> {
|
||||
console.warn('[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0');
|
||||
return new Promise<OpenAPISpec>((resolve, reject) =>
|
||||
convertObj(spec, {}, (err, res) => {
|
||||
convertObj(spec, { patch: true, warnOnly: true }, (err, res) => {
|
||||
// TODO: log any warnings
|
||||
if (err) {
|
||||
return reject(err);
|
||||
|
|
Loading…
Reference in New Issue
Block a user