toJsonFile method

void toJsonFile({
  1. required String destination,
})

Convert the OpenApi object to a JSON spec file Will overwrite the existing file if it exists

Implementation

void toJsonFile({required String destination}) {
  File(destination).writeAsStringSync(_encoder.convert(toJson()));
}