appwrite / sdk-generator
Appwrite PHP library for generating API SDKs for multiple programming languages and platforms
Installs: 50 623
Dependents: 1
Suggesters: 0
Security: 0
Stars: 273
Watchers: 23
Forks: 171
Open Issues: 54
Language:Twig
Requires
- php: >=8.3
- 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.25
- 0.39.24
- 0.39.23
- 0.39.22
- 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-feat-swift-codable-models
- dev-feat-implement-heartbeat
- dev-feat-multipart
- dev-feat-multipart-go
- dev-ci-max-lines
- dev-fix-chunk-uploads
- dev-feat-better-multipart-tests
- dev-feat-swift-multipart
- dev-fix-dotnet-uploads
- dev-feat-react-native-multipart
- dev-dart-fix-enum-caps
- dev-feat-payload-response-type
- dev-fix-multipart-with-bool
- dev-feat-multipart-typo-fix
- dev-feat-ruby-multipart
- 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-11-18 15:55:00 UTC
README
WORK IN PROGRESS - NOT READY FOR GENERAL USAGE
Appwrite SDK generator is a PHP library for auto-generating SDK libraries for multiple languages and platforms.
The SDK Generator uses predefined language settings as Twig templates to generate codebases based on different API specs.
Currently, the only spec supported is Swagger 2.0, but we intend to add support for more specifications in the near future. This generator is still lacking support for any definition/model specs.
Getting Started
Install using composer:
CLI
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
Create language and SDK instances and generate code to target directory.
<?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
Supported Specs
- Swagger 2
- OpenAPI 3 (Not Ready)
- RAML 1.0 (Not Ready)
- RAML 0.8 (Not Ready)
- Postman 2.0 (Not Ready)
- Postman 1.0 (Not Ready)
- API Blueprint 1A (Not Ready)
Supported Client / Platform SDKs
Supported Server SDKs
Contributing
All code contributions, including those by people with commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure proper review of all the code.
We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the contribution guide.
Copyright and license
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php