From 8ee51f820ff0704c93f3a4607f51a020a1e9bb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Fri, 8 Sep 2023 17:26:57 +0200 Subject: [PATCH 1/3] initial poc --- dio/dartdoc_options.yaml | 7 +++++++ dio/{ => docs}/migration_guide.md | 0 dio/lib/dio.dart | 1 + 3 files changed, 8 insertions(+) create mode 100644 dio/dartdoc_options.yaml rename dio/{ => docs}/migration_guide.md (100%) diff --git a/dio/dartdoc_options.yaml b/dio/dartdoc_options.yaml new file mode 100644 index 000000000..9e78078c5 --- /dev/null +++ b/dio/dartdoc_options.yaml @@ -0,0 +1,7 @@ +dartdoc: + showUndocumentedCategories: true + categories: + Plugins: + markdown: docs/plugins.md + MigrationGuide: + markdown: docs/migration_guide.md diff --git a/dio/migration_guide.md b/dio/docs/migration_guide.md similarity index 100% rename from dio/migration_guide.md rename to dio/docs/migration_guide.md diff --git a/dio/lib/dio.dart b/dio/lib/dio.dart index 1a4a5bafa..700ab37c5 100644 --- a/dio/lib/dio.dart +++ b/dio/lib/dio.dart @@ -1,6 +1,7 @@ /// A powerful HTTP client for Dart and Flutter, which supports global settings, /// [Interceptors], [FormData], aborting and canceling a request, /// files uploading and downloading, requests timeout, custom adapters, etc. +/// {@category MigrationGuide} library dio; export 'src/adapter.dart'; From 8d91c1566c71f86491ba8a010ce62a603d871add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Fri, 8 Sep 2023 17:41:07 +0200 Subject: [PATCH 2/3] remove plugin section --- dio/dartdoc_options.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/dio/dartdoc_options.yaml b/dio/dartdoc_options.yaml index 9e78078c5..ee8f4258a 100644 --- a/dio/dartdoc_options.yaml +++ b/dio/dartdoc_options.yaml @@ -1,7 +1,5 @@ dartdoc: showUndocumentedCategories: true categories: - Plugins: - markdown: docs/plugins.md MigrationGuide: markdown: docs/migration_guide.md From 2dceac3f3ab94b9b590ec0573ec4aece66db15e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Thu, 14 Sep 2023 15:12:07 +0200 Subject: [PATCH 3/3] Add plugins to api docs --- dio/README.md | 20 ++------------------ dio/dartdoc_options.yaml | 4 +++- dio/docs/plugins.md | 17 +++++++++++++++++ dio/lib/dio.dart | 3 ++- 4 files changed, 24 insertions(+), 20 deletions(-) create mode 100644 dio/docs/plugins.md diff --git a/dio/README.md b/dio/README.md index 3786e0045..bb18a847d 100644 --- a/dio/README.md +++ b/dio/README.md @@ -73,7 +73,7 @@ The latest version is: ![Pub](https://img.shields.io/pub/v/dio.svg) The latest version including pre-releases is: ![Pub](https://img.shields.io/pub/v/dio?include_prereleases) **Before you upgrade: Breaking changes might happen in major and minor versions of packages.
-See the [Migration Guide][] for the complete breaking changes list.** +See the [Migration Guide](https://pub.dev/documentation/dio/latest/topics/Migration%20Guide-topic.html) for the complete breaking changes list.** ### Super simple to use @@ -94,22 +94,7 @@ void getHttp() async { ### Plugins - -| Repository | Status | Description | -|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| [dio_cookie_manager](https://github.com/cfug/dio/blob/main/plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.dev/packages/dio_cookie_manager) | A cookie manager for Dio | -| [dio_http2_adapter](https://github.com/cfug/dio/blob/main/plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.dev/packages/dio_http2_adapter) | A Dio HttpClientAdapter which support Http/2.0 | -| [native_dio_adapter](https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter) | [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg)](https://pub.dev/packages/native_dio_adapter) | An adapter for Dio which makes use of cupertino_http and cronet_http to delegate HTTP requests to the native platform. | -| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry) | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.dev/packages/dio_smart_retry) | Flexible retry library for Dio | -| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning) | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.dev/packages/http_certificate_pinning) | Https Certificate pinning for Flutter | -| [dio_intercept_to_curl](https://github.com/blackflamedigital/dio_intercept_to_curl) | [![Pub](https://img.shields.io/pub/v/dio_intercept_to_curl.svg)](https://pub.dev/packages/dio_intercept_to_curl) | A Flutter curl-command generator for Dio. | -| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor) | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg)](https://pub.dev/packages/dio_cache_interceptor) | Dio HTTP cache interceptor with multiple stores respecting HTTP directives (or not) | -| [dio_http_cache](https://github.com/hurshi/dio-http-cache) | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg)](https://pub.dev/packages/dio_http_cache) | A simple cache library for Dio like Rxcache in Android | -| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger) | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg)](https://pub.dev/packages/pretty_dio_logger) | Pretty Dio logger is a Dio interceptor that logs network calls in a pretty, easy to read format. | -| [dio_image_provider](https://github.com/ueman/image_provider) | [![Pub](https://img.shields.io/pub/v/dio_image_provider.svg)](https://pub.dev/packages/dio_image_provider) | An image provider which makes use of package:dio to instead of dart:io | -| [flutter_ume_kit_dio](https://github.com/cfug/flutter_ume_kits/tree/main/packages/flutter_ume_kit_dio) | [![Pub](https://img.shields.io/pub/v/flutter_ume_kit_dio.svg)](https://pub.dev/packages/flutter_ume_kit_dio) | A debug kit of dio on flutter_ume | - -### Related Projects +[Plugins](https://pub.dev/documentation/dio/latest/topics/Plugins-topic.html) Welcome to submit third-party plugins and related libraries in [here](https://github.com/cfug/dio/issues/347). @@ -923,6 +908,5 @@ and a server is aware using specific methods and headers. You can modify your requests to match the definition of simple request, or add a CORS middleware for your service to handle CORS requests. -[Migration Guide]: ./migration_guide.md [simple request]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests [CORS preflight request]: https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request diff --git a/dio/dartdoc_options.yaml b/dio/dartdoc_options.yaml index ee8f4258a..9455461ab 100644 --- a/dio/dartdoc_options.yaml +++ b/dio/dartdoc_options.yaml @@ -1,5 +1,7 @@ dartdoc: showUndocumentedCategories: true categories: - MigrationGuide: + "Migration Guide": markdown: docs/migration_guide.md + "Plugins": + markdown: docs/plugins.md diff --git a/dio/docs/plugins.md b/dio/docs/plugins.md new file mode 100644 index 000000000..400133ada --- /dev/null +++ b/dio/docs/plugins.md @@ -0,0 +1,17 @@ +# Plugins + + +| Repository | Status | Description | +|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| +| [dio_cookie_manager](https://github.com/cfug/dio/blob/main/plugins/cookie_manager) | [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg)](https://pub.dev/packages/dio_cookie_manager) | A cookie manager for Dio | +| [dio_http2_adapter](https://github.com/cfug/dio/blob/main/plugins/http2_adapter) | [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg)](https://pub.dev/packages/dio_http2_adapter) | A Dio HttpClientAdapter which support Http/2.0 | +| [native_dio_adapter](https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter) | [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg)](https://pub.dev/packages/native_dio_adapter) | An adapter for Dio which makes use of cupertino_http and cronet_http to delegate HTTP requests to the native platform. | +| [dio_smart_retry](https://github.com/rodion-m/dio_smart_retry) | [![Pub](https://img.shields.io/pub/v/dio_smart_retry.svg)](https://pub.dev/packages/dio_smart_retry) | Flexible retry library for Dio | +| [http_certificate_pinning](https://github.com/diefferson/http_certificate_pinning) | [![Pub](https://img.shields.io/pub/v/http_certificate_pinning.svg)](https://pub.dev/packages/http_certificate_pinning) | Https Certificate pinning for Flutter | +| [dio_intercept_to_curl](https://github.com/blackflamedigital/dio_intercept_to_curl) | [![Pub](https://img.shields.io/pub/v/dio_intercept_to_curl.svg)](https://pub.dev/packages/dio_intercept_to_curl) | A Flutter curl-command generator for Dio. | +| [dio_cache_interceptor](https://github.com/llfbandit/dio_cache_interceptor) | [![Pub](https://img.shields.io/pub/v/dio_cache_interceptor.svg)](https://pub.dev/packages/dio_cache_interceptor) | Dio HTTP cache interceptor with multiple stores respecting HTTP directives (or not) | +| [dio_http_cache](https://github.com/hurshi/dio-http-cache) | [![Pub](https://img.shields.io/pub/v/dio_http_cache.svg)](https://pub.dev/packages/dio_http_cache) | A simple cache library for Dio like Rxcache in Android | +| [pretty_dio_logger](https://github.com/Milad-Akarie/pretty_dio_logger) | [![Pub](https://img.shields.io/pub/v/pretty_dio_logger.svg)](https://pub.dev/packages/pretty_dio_logger) | Pretty Dio logger is a Dio interceptor that logs network calls in a pretty, easy to read format. | +| [dio_image_provider](https://github.com/ueman/image_provider) | [![Pub](https://img.shields.io/pub/v/dio_image_provider.svg)](https://pub.dev/packages/dio_image_provider) | An image provider which makes use of package:dio to instead of dart:io | +| [flutter_ume_kit_dio](https://github.com/cfug/flutter_ume_kits/tree/main/packages/flutter_ume_kit_dio) | [![Pub](https://img.shields.io/pub/v/flutter_ume_kit_dio.svg)](https://pub.dev/packages/flutter_ume_kit_dio) | A debug kit of dio on flutter_ume | +| [sentry_dio](https://github.com/getsentry/sentry-dart) | [![Pub](https://img.shields.io/pub/v/sentry_dio.svg)](https://pub.dev/packages/sentry_dio) | An integration which adds support for performance tracing for the Dio package. | diff --git a/dio/lib/dio.dart b/dio/lib/dio.dart index 700ab37c5..60c9044c8 100644 --- a/dio/lib/dio.dart +++ b/dio/lib/dio.dart @@ -1,7 +1,8 @@ /// A powerful HTTP client for Dart and Flutter, which supports global settings, /// [Interceptors], [FormData], aborting and canceling a request, /// files uploading and downloading, requests timeout, custom adapters, etc. -/// {@category MigrationGuide} +/// {@category Migration Guide} +/// {@category Plugins} library dio; export 'src/adapter.dart';