Skip to content

Commit 0b9a034

Browse files
authored
Merge pull request #222 from PineappleIOnic/feat-add-interfaces-contributing
Add Generator Interfaces to CONTRIBUTING.md
2 parents ca8e34f + b157e9b commit 0b9a034

File tree

1 file changed

+82
-1
lines changed

1 file changed

+82
-1
lines changed

CONTRIBUTING.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,85 @@ protected $containers = [
205205
Finally, you can run the tests using
206206
```sh
207207
docker run --rm -v $(pwd):$(pwd):rw -w $(pwd) -v /var/run/docker.sock:/var/run/docker.sock php:7.4-cli-alpine sh -c "apk add docker-cli && vendor/bin/phpunit tests/SDKTest.php"
208-
```
208+
```
209+
210+
## SDK Generator Interface
211+
212+
* **spec** -- This object is derived from the appwrite swagger spec
213+
* **title** -> The title of the SDK you are generating (normally used as package name.)
214+
* **description** -> Description of Appwrite SDK
215+
* **namespace** -> SDK Namespace
216+
* **version** -> SDK Version
217+
* **endpoint** -> Default Endpoint (example: "https://appwrite.io/v1")
218+
* **host** -> Default Host (example: "appwrite.io")
219+
* **basePath** -> Default Path to API (example: "/v1")
220+
* **licenseName** -> Name of licence for SDK
221+
* **licenseURL** -> URL to SDK Licence
222+
* **contactName** -> Name of Person/Team that created the SDK
223+
* **contactURL** -> URL to contact for help with the SDK
224+
* **contactEmail** -> Email Address to Contact for help with the SDK
225+
* **services** -> Array of Services. Each service contains the following:
226+
* **name** -> The name of the service
227+
* **methods** -> Array of Methods that can be used with the service
228+
* **method** -> HTTP Method to call
229+
* **path** -> Path to API without a basePath
230+
* **fullPath** -> Path to API with basePath
231+
* **name** -> Name of API Method
232+
* **packaging** -> A flag to indicate if the files at a path need to be packaged as a tarfile
233+
* **title** -> Title of API Method
234+
* **description** -> Description of API Method
235+
* **security** -> Array of security methods for this API Call. Primarily used for code examples.
236+
* **consumes** -> Array of Content-Type headers the API Route accepts.
237+
* **cookies** -> Are cookies required? Bool
238+
* **type** -> Response Type. Tells us whether the endpoint returns a JSON Payload, A URL or redirect to an auth mechanism.
239+
* **headers** -> Array of headers for API
240+
* **parameters** -> Parameters for API
241+
* **all** -> Array containing all Parameters
242+
* **headers** -> Array containing parameters that go in the header
243+
* **path** -> Array containing parameters that go into the path of the API URL
244+
* **query** -> Array containing parameters that go into the query of the API URL
245+
* **body** -> Array containing parameters that go in the body
246+
247+
All Parameters will have a structure like so:
248+
* **name** -> Name of parameter
249+
* **type** -> Parameter Type
250+
* **description** -> Parameter Description
251+
* **required** -> Is parameter required
252+
* **default** -> Parameter Defaults
253+
* **example** -> Parameter Example
254+
* **array**
255+
* **type** -> Array Type (only used if param type is "array")
256+
* **global**
257+
* **headers** -> A object containing all global headers
258+
* **defaultHeaders** -> A object containing all default headers
259+
260+
* **language** -- Information on the current language SDK
261+
* **name** -> Name of language
262+
* **params** -> Custom langauge specific parameters
263+
264+
* **sdk** -- Various Metadata used for packaging and categorising
265+
* **namespace** -> SDK Namespace
266+
* **name** -> SDK Name
267+
* **description** -> SDK Desc
268+
* **shortDescription** -> SDK Short Desc
269+
* **version** -> SDK Version
270+
* **license** -> SDK Licence
271+
* **licenseContent** -> SDK Licence content
272+
* **gitURL** -> GIT URL for SDK
273+
* **gitRepo** -> GIT Repo for SDK
274+
* **gitRepoName** -> Git Repo Name
275+
* **gitUserName** -> Git username of creator
276+
* **logo** -> SDK Logo
277+
* **url** -> SDK URL
278+
* **shareText** -> Social Media Metadata
279+
* **shareURL** -> Social Media Metadata
280+
* **shareVia** -> Social Media Metadata
281+
* **shareTags** -> Social Media Metadata
282+
* **warning** -> Used for warnings usually communicated within the Readme.md
283+
* **gettingStarted** -> Raw Markdown for Getting Started
284+
* **readme** -> Stores the raw markdown used to generate the readme.md file. [here](https://github.com/appwrite/sdk-for-flutter/blob/master/README.md)
285+
* **changelog** -> Stores the raw markdown used to generate the changelog.md file. [here](https://github.com/appwrite/sdk-for-flutter/blob/master/CHANGELOG.md)
286+
* **examples** -> Stores the raw markdown used to generate examples for your SDK. A example can be found [here](https://github.com/appwrite/sdk-for-flutter/tree/master/example)
287+
* **twitterHandle** -> Twitter handle of creator
288+
* **discordChannel** -> Discord Channel ID for SDK
289+
* **discordUrl** -> Discord Server Invite for SDK

0 commit comments

Comments
 (0)