Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generating SDKs for multiple programming languages and platforms ⚙️

License

NotificationsYou must be signed in to change notification settings

appwrite/sdk-generator

Repository files navigation

DiscordBuild StatusTwitter AccountFollow Appwrite on StackShareappwrite.io

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 asTwig 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.

<?phprequire_once'vendor/autoload.php';useAppwrite\Spec\Swagger2;useAppwrite\SDK\SDK;useAppwrite\SDK\Language\PHP;// Read API specification file (Swagger 2) and create spec instance$spec =newSwagger2(file_get_contents('https://appwrite.io/v1/open-api-2.json?extension=1'));// Create language instance$lang =newPHP();$lang// Set language or platform specific options    ->setComposerPackage('my-api')    ->setComposerVendor('my-company');// Create the SDK object with the language and spec instances$sdk  =newSDK($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

Supported Client / Platform SDKs

LanguageSupported VersionsCoding StandardsPackage ManagerMaintainer
WebES5+NPM Coding StyleNPM, Yarn,@eldadfux
FlutterEffective Dartpub tool@bartektartanus@Almoullim@lohanidamodar
Android (Kotlin, Java)5.0+Android style guideGradle, Maven@abnegate
iOS, macOS (Swift)iOS 15+, macOS 11+Swift Style GuideSwift Pkg Manager@abnegate
Unity (Csharp)?You?

Supported Server SDKs

LanguageSupported VersionsCoding StandardsPackage ManagerContributors
TypeScriptNPM Coding StyleNPM, Yarn@eldadfux
NodeJS8, 10, 12NPM Coding StyleNPM, Yarn@eldadfux
PHP7.0+PHP FIGComposer@eldadfux
Ruby2.4+Ruby Style GuideGEM@eldadfux@abnegate
Python3.5+PEP8PIP@eldadfux@abnegate
Dart2.7+Effective Dartpub@lohanidamodar
GoEffective Gogo get@panz3r [@phaus]
.NET.NET core 3.1C# Coding ConventionsNuGet@komemi@TorstenDittmann
D?You?
Kotlin1.4.31+Kotlin style guideGradle, Maven@abnegate
Java8+Google style guideGradle, Maven@abnegate
Swift5.5+Swift Style GuideSwift Pkg Manager@abnegate
Docker CLIDocker Hub@christyjacob4

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 thecontribution guide.

Copyright and license

The MIT License (MIT)http://www.opensource.org/licenses/mit-license.php


[8]ページ先頭

©2009-2025 Movatter.jp