appwrite / sdk-generator
Appwrite PHP 库,用于生成多种编程语言和平台上的 API SDK
0.39.21
2024-09-10 08:49 UTC
Requires
- php: >=8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- matthiasmullie/minify: 1.3.*
- twig/twig: 3.14.*
Requires (Dev)
- brianium/paratest: 7.*
- phpunit/phpunit: 11.*
- squizlabs/php_codesniffer: 3.*
- dev-master
- 1.5.x-dev
- 1.4.x-dev
- 0.39.21
- 0.39.20
- 0.39.19
- 0.39.18
- 0.39.17
- 0.39.16
- 0.39.15
- 0.39.14
- 0.39.13
- 0.39.12
- 0.39.11
- 0.39.10
- 0.39.9
- 0.39.8
- 0.39.7
- 0.39.6
- 0.39.5
- 0.39.4
- 0.39.3
- 0.39.2
- 0.39.1
- 0.39.0
- 0.38.8
- 0.38.7
- 0.38.6
- 0.38.5
- 0.38.4
- 0.38.2
- 0.38.1
- 0.38.0
- 0.37.12
- 0.37.11
- 0.37.10
- 0.37.9
- 0.37.8
- 0.37.7
- 0.37.6
- 0.37.5
- 0.37.4
- 0.37.3
- 0.37.2
- 0.37.1
- 0.37.0
- 0.37.0-rc.6
- 0.37.0-rc.5
- 0.37.0-rc.4
- 0.37.0-rc.3
- 0.37.0-rc.2
- 0.37.0-rc.1
- 0.36.4
- 0.36.3
- 0.36.2
- 0.36.1
- 0.36.0
- 0.35.3
- 0.35.2
- 0.35.1
- 0.35.0
- 0.34.2
- 0.34.1
- 0.34.0
- 0.33.7
- 0.33.6
- 0.33.5
- 0.33.4
- 0.33.3
- 0.33.2
- 0.33.1
- 0.33.0
- 0.32.3
- 0.32.2
- 0.32.1
- 0.32.0
- 0.31.0
- 0.30.3
- 0.30.2
- 0.30.1
- 0.30.0
- 0.29.x-dev
- 0.29.4
- 0.29.3
- 0.29.2
- 0.29.1
- 0.29.0
- 0.28.1
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.1
- 0.20.0
- 0.19.6
- 0.19.5
- 0.19.4
- 0.19.3
- 0.19.2
- 0.19.1
- 0.19.0
- 0.18.8
- 0.18.7
- 0.18.6
- 0.18.5
- 0.18.4
- 0.18.3
- 0.18.2
- 0.18.1
- 0.18.0
- 0.17.2
- 0.17.1
- 0.17.0
- 0.16.3
- 0.16.2
- 0.16.1
- 0.16.0
- 0.15.3
- 0.15.2
- 0.15.1
- 0.15.0
- 0.14.6
- 0.14.5
- 0.14.4
- 0.14.3
- 0.14.2
- 0.14.1
- 0.14.0
- 0.13.0
- 0.12.1
- 0.12.0
- 0.11.1
- 0.11.0
- 0.10.11
- 0.10.10
- 0.10.9
- 0.10.8
- 0.10.7
- 0.10.6
- 0.10.5
- 0.10.4
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-fix-multipart-with-bool
- dev-fix-python-multipart
- dev-fix-139-invalid-url
- dev-feat-multipart-typo-fix
- dev-feat-swift-multipart
- dev-feat-react-native-multipart
- dev-feat-multipart
- dev-feat-add-binary-support-for-dart
- dev-feat-binary-support-dart-DL
- dev-feat-android-multipart
- dev-feat-kotlin-multipart
- dev-feat-dotnet-mutlipart
- dev-feat-deno-multipart
- dev-feat-multipart-web
- dev-feat-binary-support-for-node
- dev-fix-60-invalid-scopes
- dev-feat-multipart-compiled-tests
- dev-feat-ruby-multipart
- dev-feat-dart-flutter-multipart
- dev-fix-nested-array-types
- dev-feat-removing-variable-push
- dev-update-spec-generation
- dev-feat-local-variables
- dev-fix-go-data
- dev-improve-cli-qa
- dev-fix-init-bugs
- dev-docs-update-sdk-permissions
- dev-Init-organization
- dev-fix-flutter-211
- dev-fix-java
- dev-revert-871-feat-search-list
- dev-feat-esm-first
- dev-fix-missing-input-file
- dev-fix-flutter-realtime-multisub
- dev-feat-react-native-testing
- dev-refactor-tests
- dev-chore-refactor-casing
- dev-feat-node-web-support-edge
- dev-feat-types-generator-command
- dev-fix-more-examples
- dev-feat-apple-messaging
- dev-feat-python-type-hints-sync
- dev-feat-cli-flutter-extension
- dev-chore-use-parsevalues
- dev-feat-whitelist-enums
- dev-feat-bun-support
- dev-fix-cli-for-1.4
- dev-fix-chunked-upload-issues
- dev-fix-cli-chunk-upload2
- dev-fix-cli-chunk-upload-test
- dev-feat-crystal-sdk
- dev-fix-list-generic-type
- dev-cli-1.4.x
- dev-feat-dependency-upgrades
- dev-improve-dotnet-sdk
- dev-fix-prefs-permissions
- dev-fix-dotnet-exception
- dev-fix-python-sdk-issue
- dev-update-dotnet-docs-example
- dev-fix-python-build
- dev-update-dotnet-package-icon-readme
- dev-fix-python-nullables
- dev-feat-python-type-hints
- dev-feat-build-script
- dev-shimon-video-test
- dev-revert-642-fix-cli
- dev-fix-oauth
- dev-feat-revert-offline
- dev-feat-new-queries
- dev-fix-node-exception-types
- dev-feat-cli-buckets
- dev-refactor-deno-templates
- dev-feat-refactor-deno-templates
- dev-fix-web-refactor
- dev-feat-test-downloads
- dev-feat-android-13-tests
- dev-feat-cli-settings
- dev-feat-new-headers-merge
- dev-feat-examples-for-0.16
- dev-feat-examples-update
- dev-feat-refactor-dotnet-templates
- dev-feat-refactor-node-templates
- dev-refactor-node-templates
- dev-feat-swift-5.6-support
- dev-feat-kotlin-multi-module
- dev-feat-lua
This package is auto-updated.
Last update: 2024-09-20 18:27:21 UTC
README
正在进行中 - 不适用于通用使用
Appwrite SDK 生成器是一个 PHP 库,用于自动生成多种语言和平台的 SDK 库。
SDK 生成器使用预定义的语言设置作为 Twig 模板,根据不同的 API 规范生成代码库。
目前,仅支持 Swagger 2.0 规范,但我们计划在不久的将来添加对更多规范的支持。此生成器仍不支持任何定义/模型规范。
入门指南
使用 composer 安装
命令行界面
composer update --ignore-platform-reqs --optimize-autoloader
Docker (UNIX)
docker run --rm --interactive --tty --volume "$(pwd)":/app composer install --ignore-platform-reqs
Docker (Windows)
docker run --rm --interactive --tty --volume "%cd%":/app composer install --ignore-platform-reqs
创建语言和 SDK 实例,并将生成的代码输出到目标目录。
<?php require_once 'vendor/autoload.php'; use Appwrite\Spec\Swagger2; use Appwrite\SDK\SDK; use Appwrite\SDK\Language\PHP; // Read API specification file (Swagger 2) and create spec instance $spec = new Swagger2(file_get_contents('https://appwrite.io/v1/open-api-2.json?extension=1')); // Create language instance $lang = new PHP(); $lang // Set language or platform specific options ->setComposerPackage('my-api') ->setComposerVendor('my-company') ; // Create the SDK object with the language and spec instances $sdk = new SDK($lang, $spec); $sdk ->setLogo('https://appwrite.io/v1/images/console.png') ->setLicenseContent('License content here.') ->setVersion('v1.1.0') ; $sdk->generate(__DIR__ . '/examples/php'); // Generate source code
支持的规范
- Swagger 2
- OpenAPI 3(尚未准备就绪)
- RAML 1.0(尚未准备就绪)
- RAML 0.8(尚未准备就绪)
- Postman 2.0(尚未准备就绪)
- Postman 1.0(尚未准备就绪)
- API Blueprint 1A(尚未准备就绪)
支持客户端/平台 SDK
支持服务器 SDK
贡献
所有代码贡献,包括具有提交访问权限的人的贡献,都必须通过 pull request,并由核心开发者批准后才能合并。这是为了确保对所有代码进行适当的审查。
我们真的喜欢 pull request!如果您想帮忙,您可以在 贡献指南 中了解更多关于如何为此项目做出贡献的信息。
版权和许可
MIT 许可证 (MIT) http://www.opensource.org/licenses/mit-license.php