Skip to content

Commit 3d54f83

Browse files
committed
Auto-generate SDK for CoinAPI Exchange Rates API REST Realtime
1 parent cf4b0c6 commit 3d54f83

File tree

128 files changed

+555
-910
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+555
-910
lines changed

coinapi/exchange-rates-api-rest-realtime/sdk/android/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,7 @@ Authentication schemes defined for the API:
113113

114114
### JWT
115115

116-
- **Type**: API key
117-
118-
- **API key parameter name**: Authorization
119-
- **Location**: HTTP header
116+
- **Type**: HTTP Bearer Token authentication (JWT)
120117

121118

122119
## Recommendation

coinapi/exchange-rates-api-rest-realtime/sdk/android/src/main/java/org/openapitools/client/ApiInvoker.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ public static void initializeInstance(Cache cache, Network network, int threadPo
204204
// Setup authentications (key: authentication name, value: authentication).
205205
INSTANCE.authentications = new HashMap<String, Authentication>();
206206
INSTANCE.authentications.put("APIKey", new ApiKeyAuth("header", "Authorization"));
207-
INSTANCE.authentications.put("JWT", new ApiKeyAuth("header", "Authorization"));
208207
// Prevent the authentications from being modified.
209208
INSTANCE.authentications = Collections.unmodifiableMap(INSTANCE.authentications);
210209
}

coinapi/exchange-rates-api-rest-realtime/sdk/apex/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ Authentication schemes defined for the API:
9595

9696
### JWT
9797

98-
- **Type**: API key
99-
- **API key parameter name**: Authorization
100-
- **Location**: HTTP header
98+
- **Type**: HTTP Bearer Token authentication (JWT)
10199

102100

103101
## Author

coinapi/exchange-rates-api-rest-realtime/sdk/apex/force-app/main/default/classes/OASClient.cls

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ public class OASClient extends OAS.ApiClient {
33
basePath = 'https://api-realtime.exrates.coinapi.io';
44
calloutName = 'Exchange_Rates_Realtime_REST_API';
55
authentications.put('APIKey', new OAS.ApiKeyHeaderAuth('Authorization'));
6-
authentications.put('JWT', new OAS.ApiKeyHeaderAuth('Authorization'));
76
}
87
}

coinapi/exchange-rates-api-rest-realtime/sdk/apex/force-app/main/default/classes/OASExchangeRatesApiTest.cls

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ private class OASExchangeRatesApiTest {
6060
System.assertEquals(expectedResponse, response);
6161
client = new OASClient();
6262
api = new OASExchangeRatesApi(client);
63-
((OAS.ApiKeyAuth)client.getAuthentication('JWT')).setApiKey('foo-bar-api-key');
64-
6563

6664
js = JSON.serialize(OASV1ExchangeRate.getExample());
6765
res.setHeader('Content-Type', 'application/json');
@@ -156,8 +154,6 @@ private class OASExchangeRatesApiTest {
156154
System.assertEquals(expectedResponse, response);
157155
client = new OASClient();
158156
api = new OASExchangeRatesApi(client);
159-
((OAS.ApiKeyAuth)client.getAuthentication('JWT')).setApiKey('foo-bar-api-key');
160-
161157

162158
js = JSON.serialize(OASV1ExchangeRates.getExample());
163159
res.setHeader('Content-Type', 'application/json');

coinapi/exchange-rates-api-rest-realtime/sdk/apex/force-app/main/default/classes/OASMetadataApiTest.cls

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ private class OASMetadataApiTest {
3535
System.assertEquals(expectedResponse, response);
3636
client = new OASClient();
3737
api = new OASMetadataApi(client);
38-
((OAS.ApiKeyAuth)client.getAuthentication('JWT')).setApiKey('foo-bar-api-key');
39-
4038

4139
js = JSON.serialize(new List<OASV1Asset>{OASV1Asset.getExample()});
4240
res.setHeader('Content-Type', 'application/json');
@@ -81,8 +79,6 @@ private class OASMetadataApiTest {
8179
System.assertEquals(expectedResponse, response);
8280
client = new OASClient();
8381
api = new OASMetadataApi(client);
84-
((OAS.ApiKeyAuth)client.getAuthentication('JWT')).setApiKey('foo-bar-api-key');
85-
8682

8783
js = JSON.serialize(new List<OASV1Asset>{OASV1Asset.getExample()});
8884
res.setHeader('Content-Type', 'application/json');
@@ -127,8 +123,6 @@ private class OASMetadataApiTest {
127123
System.assertEquals(expectedResponse, response);
128124
client = new OASClient();
129125
api = new OASMetadataApi(client);
130-
((OAS.ApiKeyAuth)client.getAuthentication('JWT')).setApiKey('foo-bar-api-key');
131-
132126

133127
js = JSON.serialize(new List<OASV1Icon>{OASV1Icon.getExample()});
134128
res.setHeader('Content-Type', 'application/json');

coinapi/exchange-rates-api-rest-realtime/sdk/bash/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ For convenience, you can export the following environment variables:\n\
3838
\n\
3939
4040
41-
4241
\n\
4342
$(tput setaf 7)Basic usage:$(tput sgr0)\n\
4443
\n\

coinapi/exchange-rates-api-rest-realtime/sdk/bash/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,5 @@ Class | Method | HTTP request | Description
133133
## JWT
134134

135135

136-
- **Type**: API key
137-
- **API key parameter name**: Authorization
138-
- **Location**: HTTP header
136+
- **Type**: HTTP Bearer Token authentication (JWT)
139137

coinapi/exchange-rates-api-rest-realtime/sdk/bash/client.sh

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ host=""
153153
# The user credentials for basic authentication
154154
basic_auth_credential=""
155155

156-
##
157-
# The user API key
158-
apikey_auth_credential=""
159156
##
160157
# The user API key
161158
apikey_auth_credential=""
@@ -264,18 +261,12 @@ header_arguments_to_curl() {
264261
local api_key_header=""
265262
local api_key_header_in_cli=""
266263
api_key_header="Authorization"
267-
local api_key_header=""
268-
local api_key_header_in_cli=""
269-
api_key_header="Authorization"
270264

271265
for key in "${!header_arguments[@]}"; do
272266
headers_curl+="-H \"${key}: ${header_arguments[${key}]}\" "
273267
if [[ "${key}XX" == "${api_key_header}XX" ]]; then
274268
api_key_header_in_cli="YES"
275269
fi
276-
if [[ "${key}XX" == "${api_key_header}XX" ]]; then
277-
api_key_header_in_cli="YES"
278-
fi
279270
done
280271
#
281272
# If the api_key was not provided in the header, try one from the
@@ -284,13 +275,6 @@ header_arguments_to_curl() {
284275
if [[ -z $api_key_header_in_cli && -n $apikey_auth_credential ]]; then
285276
headers_curl+="-H \"${api_key_header}: ${apikey_auth_credential}\""
286277
fi
287-
#
288-
# If the api_key was not provided in the header, try one from the
289-
# environment variable
290-
#
291-
if [[ -z $api_key_header_in_cli && -n $apikey_auth_credential ]]; then
292-
headers_curl+="-H \"${api_key_header}: ${apikey_auth_credential}\""
293-
fi
294278
headers_curl+=" "
295279

296280
echo "${headers_curl}"
@@ -553,8 +537,6 @@ EOF
553537
echo -e ""
554538
echo -e " - ${BLUE}Api-key${OFF} - add '${RED}Authorization:<api-key>${OFF}' after ${YELLOW}<operation>${OFF}"
555539

556-
echo -e " - ${BLUE}Api-key${OFF} - add '${RED}Authorization:<api-key>${OFF}' after ${YELLOW}<operation>${OFF}"
557-
558540
echo ""
559541
echo -e "${BOLD}${WHITE}Operations (grouped by tags)${OFF}"
560542
echo ""
@@ -630,7 +612,7 @@ print_version() {
630612
##############################################################################
631613
print_getSpecificRate_help() {
632614
echo ""
633-
echo -e "${BOLD}${WHITE}getSpecificRate - Get specific rate${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - HEADER)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
615+
echo -e "${BOLD}${WHITE}getSpecificRate - Get specific rate${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - )${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
634616
echo -e ""
635617
echo -e "Retrieves the exchange rate for a specific base and quote asset at a given time or the current rate.
636618
@@ -653,7 +635,7 @@ If you are using an exchange rate for mission-critical operations, then for best
653635
##############################################################################
654636
print_v1ExchangerateAssetIdBaseGet_help() {
655637
echo ""
656-
echo -e "${BOLD}${WHITE}v1ExchangerateAssetIdBaseGet - Get all current rates${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - HEADER)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
638+
echo -e "${BOLD}${WHITE}v1ExchangerateAssetIdBaseGet - Get all current rates${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - )${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
657639
echo -e ""
658640
echo -e "Get the current exchange rate between requested asset and all other assets.
659641
@@ -683,7 +665,7 @@ You can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 /
683665
##############################################################################
684666
print_v1AssetsAssetIdGet_help() {
685667
echo ""
686-
echo -e "${BOLD}${WHITE}v1AssetsAssetIdGet - List all assets by asset ID${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - HEADER)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
668+
echo -e "${BOLD}${WHITE}v1AssetsAssetIdGet - List all assets by asset ID${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - )${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
687669
echo -e ""
688670
echo -e "${BOLD}${WHITE}Parameters${OFF}"
689671
echo -e " * ${GREEN}asset_id${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - The asset ID. ${YELLOW}Specify as: asset_id=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
@@ -699,7 +681,7 @@ print_v1AssetsAssetIdGet_help() {
699681
##############################################################################
700682
print_v1AssetsGet_help() {
701683
echo ""
702-
echo -e "${BOLD}${WHITE}v1AssetsGet - List all assets${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - HEADER)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
684+
echo -e "${BOLD}${WHITE}v1AssetsGet - List all assets${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - )${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
703685
echo -e ""
704686
echo -e "Retrieves all assets.
705687
@@ -726,7 +708,7 @@ Properties of the output are providing aggregated information from across all sy
726708
##############################################################################
727709
print_v1AssetsIconsSizeGet_help() {
728710
echo ""
729-
echo -e "${BOLD}${WHITE}v1AssetsIconsSizeGet - List all asset icons${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - HEADER)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
711+
echo -e "${BOLD}${WHITE}v1AssetsIconsSizeGet - List all asset icons${OFF}${BLUE}(AUTH - HEADER)${OFF}${BLUE}(AUTH - )${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
730712
echo -e ""
731713
echo -e "Gets the list of icons (of the given size) for all the assets." | paste -sd' ' | fold -sw 80
732714
echo -e ""
@@ -1071,13 +1053,6 @@ case $key in
10711053
if [[ $header_name == "Authorization" ]]; then
10721054
apikey_auth_credential=$header_value
10731055
fi
1074-
#
1075-
# If the header key is the same as the api_key expected by API in the
1076-
# header, override the ${apikey_auth_credential} variable
1077-
#
1078-
if [[ $header_name == "Authorization" ]]; then
1079-
apikey_auth_credential=$header_value
1080-
fi
10811056
header_arguments[$header_name]=$header_value
10821057
else
10831058
curl_arguments+=" $key"

coinapi/exchange-rates-api-rest-realtime/sdk/c/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,8 @@ Authentication schemes defined for the API:
9696

9797
### JWT
9898

99-
- **Type**: API key
10099

101-
- **API key parameter name**: Authorization
102-
- **Location**: HTTP header
100+
- **Type**: HTTP Bearer Token authentication (JWT)
103101

104102

105103
## Author

0 commit comments

Comments
 (0)