opentool_dart 0.2.2 copy "opentool_dart: ^0.2.2" to clipboard
opentool_dart: ^0.2.2 copied to clipboard

An OpenTool JSON Spec Parser for dart with ToolDrivers.

example/opentool_dart_example.dart

import 'dart:io';
import 'package:opentool_dart/opentool_dart.dart';

void main() async {
  List<String> jsonFileNameList = [
    "mock_tool.json"
  ];

  String currentWorkingDirectory = Directory.current.path;
  jsonFileNameList.forEach((jsonFileName) async {
    print("FILE_NAME: $jsonFileName");
    String jsonPath = "$currentWorkingDirectory${Platform.pathSeparator}example${Platform.pathSeparator}custom_driver${Platform.pathSeparator}$jsonFileName";
    OpenToolLoader openToolLoader = OpenToolLoader();
    OpenTool openTool = await openToolLoader.loadFromFile(jsonPath);
    print("title: ${openTool.info.title}");
  });
}