forked from nftstorage/nft.storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client-gen.sh
executable file
·83 lines (71 loc) · 2.57 KB
/
client-gen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Generates clients for various languages from the OpenAPI schema.
# Writes to ./out
# Ruby
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/packages/website/public/schema.yml \
-g ruby \
--api-name-suffix=API \
--git-user-id=nftstorage \
--git-repo-id=ruby-client \
--additional-properties=gemName=nft_storage \
--additional-properties="gemSummary=A client library for the https://nft.storage/ service." \
--additional-properties="gemDescription=A client library for the https://nft.storage/ service." \
--additional-properties=moduleName=NFTStorage \
-o /local/out/ruby-client
# Go
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/packages/website/public/schema.yml \
-g go \
--api-name-suffix=API \
--git-user-id=nftstorage \
--git-repo-id=go-client \
--additional-properties=packageName=nftstorage \
-o /local/out/go-client
# Python
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/packages/website/public/schema.yml \
-g python \
--api-name-suffix=API \
--git-user-id=nftstorage \
--git-repo-id=python-client \
--additional-properties=projectName=nft.storage \
--additional-properties=packageName=nft_storage \
-o /local/out/python-client
# Rust
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/packages/website/public/schema.yml \
-g rust \
--api-name-suffix=API \
--git-user-id=nftstorage \
--git-repo-id=rust-client \
--additional-properties=packageName=nftstorage \
-o /local/out/rust-client
# PHP
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/packages/website/public/schema.yml \
-g php \
--api-name-suffix=API \
--git-user-id=nftstorage \
--git-repo-id=php-client \
--additional-properties=packageName=NFTStorage \
--additional-properties=invokerPackage=NFTStorage \
-o /local/out/php-client
# Java
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/packages/website/public/schema.yml \
-g java \
--git-user-id=nftstorage \
--git-repo-id=java-client \
--additional-properties=invokerPackage=storage.nft \
--additional-properties=apiPackage=storage.nft.api \
--additional-properties=modelPackage=storage.nft.model \
--additional-properties=groupId=nft.storage \
--additional-properties=artifactId=nft.storage-client \
--additional-properties="artifactDescription=A client library for the https://nft.storage/ service." \
-o /local/out/java-client