swagger_json_filter 1.0.1 copy "swagger_json_filter: ^1.0.1" to clipboard
swagger_json_filter: ^1.0.1 copied to clipboard

Is a dart utility library inspired by javascript swagger_json_filter library.

example/swagger_json_filter_example.dart

import 'dart:io' show File;

import 'package:swagger_json_filter/swagger_json_filter.dart';

void main() {
  final specPath = 'pet.json';
  final jsonString = File(specPath).readAsStringSync();

  final swaggerJsonFilter = SwaggerJsonFilter(
    options: SwaggerJsonFilterOptions(
        // includeTags: [
        //   RegExp(r'^Include Tag.*'),
        // ],
        // excludeTags: [
        //   RegExp(r'^Exclude Tag$'),
        // ],
        // includePaths: [
        //   RegExp(r'^/api/v1/app/.*'),
        // ],
        // excludePaths: [
        //   RegExp(r'(.*?)'),
        // ],
        ),
  );
  final output = swaggerJsonFilter.filter(jsonString);
  File(specPath).writeAsStringSync(output);
}
2
likes
160
points
26
downloads

Publisher

verified publishernoncheat.com

Weekly Downloads

Is a dart utility library inspired by javascript swagger_json_filter library.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flat, gato

More

Packages that depend on swagger_json_filter