openapi_dart 0.1.1 copy "openapi_dart: ^0.1.1" to clipboard
openapi_dart: ^0.1.1 copied to clipboard

An OpenAPI JSON Spec Parser, fromJson and toJson

openapi_dart #

An OpenAPI JSON Spec Parser for dart, from: https://swagger.io/specification/

  • OpenAPI version: 3.1

Features #

  • Load OpenAPI json file, and convert to dart object

Usage #

According to /example/openapi_dart_example.dart

  • From JSON String
Future<void> main() async {
  String jsonString = "{...OpenAPI String...}";
  OpenAPILoader openAPILoader = OpenAPILoader();
  OpenAPI openAPI = await openAPILoader.load(jsonString);
}
  • From JSON File
Future<void> main() async {
  String jsonPath = "$currentWorkingDirectory/example/json/$jsonFileName";
  OpenAPILoader openAPILoader = OpenAPILoader();
  OpenAPI openAPI = await openAPILoader.loadFromFile(jsonPath);
}
1
likes
0
points
178
downloads

Publisher

verified publisherdjbird.top

Weekly Downloads

An OpenAPI JSON Spec Parser, fromJson and toJson

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

json_annotation

More

Packages that depend on openapi_dart