Code Monkey home page Code Monkey logo

sdk-generator's Introduction

⚙️ Appwrite SDK Generator

Discord Build Status Twitter Account Follow Appwrite on StackShare appwrite.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 a 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 specification in the near future. This generator is still lacking support for any definition/models 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

Docker (Windows)

docker run --rm --interactive --tty --volume "%cd%":/app composer install

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

Supported Client / Platform SDKs

Language Supported Versions Coding Standards Package Manager Maintainer
Web ES5+ NPM Coding Style NPM, Yarn, @eldadfux
Flutter Effective Dart pub tool @bartektartanus @Almoullim @lohanidamodar
Android (Kotlin, Java) 5.0+ Android style guide Gradle, Maven @abnegate
iOS (Swift) Swift Pkg Manager @armino-dev
Unity (Csharp) ? You?

Supported Server SDKs

Language Supported Versions Coding Standards Package Manager Contributors
TypeScript NPM Coding Style NPM, Yarn @eldadfux
NodeJS 8, 10, 12 NPM Coding Style NPM, Yarn @eldadfux
PHP 7.0+ PHP FIG Composer @eldadfux
Ruby 2.4+ Ruby Style Guide GEM @eldadfux
Python 3.5+ PEP8 PIP @eldadfux
Dart 2.7+ Effective Dart pub @lohanidamodar
Go Effective Go go get @panz3r
.NET .NET core 3.1 C# Coding Conventions NuGet @komemi @TorstenDittmann
D ? You?
Kotlin 1.4.31+ Kotlin style guide Gradle, Maven @abnegate
Java 8+ Google style guide Gradle, Maven @abnegate
Swift Swift Pkg Manager @armino-dev
Docker CLI Docker Hub @christyjacob4

Contributing

All code contributions - including those of people having commit access - must go through a pull request and 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

sdk-generator's People

Contributors

eldadfux avatar lohanidamodar avatar torstendittmann avatar christyjacob4 avatar abnegate avatar almoullim avatar pineappleionic avatar armino-dev avatar bartektartanus avatar peter279k avatar w4nn4die avatar silfalion avatar ng29 avatar nilsreichardt avatar kutear avatar aliyss avatar alenros avatar aditya803 avatar ozdemirburak avatar panz3r avatar smonami avatar pedromassango avatar princejhabak avatar gitter-badger avatar bencehornyak avatar kodumbeats avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.