Open thim81 opened 1 year ago
yes this would be great. in addition we make heavily use of $ref
to other files what the best solution to tackle those? format one file after the other?
You could try to do them one by one, although it is not ideal and I m not sure it it would work fully.
Another approach could be to use a good diff tool and diff the final, formatted result with the various files. Also not ideal.
Ideally, would be to have openapi-format support referenced files. I need to find time to play with the json-ref library. If you or anybody else are interested, I always welcome PRs.
Cool thanks a lot. I‘ll explore myself options too..
Currently, openapi-format dereferences the OpenAPI documents to do its formatting, sorting, ... and write a dereferenced result.
Investigate the option to leverage: https://www.npmjs.com/package/json-refs to format the OpenAPI documents and update the $ref values in different files.