speakeasy_client_sdk_ruby 2.2.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/{sdk → speakeasy_client_sdk}/apiendpoints.rb +66 -49
- data/lib/{sdk → speakeasy_client_sdk}/apis.rb +49 -37
- data/lib/speakeasy_client_sdk/auth.rb +57 -0
- data/lib/{sdk → speakeasy_client_sdk}/embeds.rb +20 -15
- data/lib/speakeasy_client_sdk/events.rb +63 -0
- data/lib/{sdk → speakeasy_client_sdk}/metadata.rb +26 -19
- data/lib/speakeasy_client_sdk/models/operations/deleteapi_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteapi_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteschema_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteschema_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_request.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschema_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschema_response.rb +39 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_response.rb +39 -0
- data/lib/speakeasy_client_sdk/models/operations/file.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiversions_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiversions_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getapis_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getapis_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschema_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getschema_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemadiff_request.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemadiff_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemarevision_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemarevision_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemas_request.rb +27 -0
- data/lib/{sdk/models/operations/getplugins.rb → speakeasy_client_sdk/models/operations/getschemas_response.rb} +8 -10
- data/lib/{sdk/models/operations/getvalidembedaccesstokens.rb → speakeasy_client_sdk/models/operations/getvalidembedaccesstokens_response.rb} +9 -11
- data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/op.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/postworkspaceevents_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/postworkspaceevents_response.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/queryeventlog_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/queryeventlog_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/queryparam_op.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/registerschema_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/registerschema_requestbody.rb +24 -0
- data/lib/{sdk/models/operations/validateapikey.rb → speakeasy_client_sdk/models/operations/registerschema_response.rb} +7 -9
- data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapi_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapi_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_request.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/validateapikey_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations.rb +77 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/api.rb +9 -10
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/api_input.rb +6 -7
- data/lib/speakeasy_client_sdk/models/shared/apiendpoint.rb +54 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/apiendpoint_input.rb +8 -9
- data/lib/speakeasy_client_sdk/models/shared/apikeydetails.rb +24 -0
- data/lib/speakeasy_client_sdk/models/shared/boundedrequest.rb +63 -0
- data/lib/speakeasy_client_sdk/models/shared/clievent.rb +156 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/embedaccesstokenresponse.rb +3 -4
- data/lib/speakeasy_client_sdk/models/shared/embedtoken.rb +51 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/error.rb +4 -5
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/filter.rb +5 -6
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/filters.rb +6 -7
- data/lib/speakeasy_client_sdk/models/shared/generate_bump_type.rb +22 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/generateopenapispecdiff.rb +4 -5
- data/lib/speakeasy_client_sdk/models/shared/interaction_type.rb +19 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/requestmetadata.rb +4 -5
- data/lib/speakeasy_client_sdk/models/shared/schema.rb +39 -0
- data/lib/speakeasy_client_sdk/models/shared/schemadiff.rb +30 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/security.rb +3 -4
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/unboundedrequest.rb +7 -8
- data/lib/speakeasy_client_sdk/models/shared/valuechange.rb +27 -0
- data/lib/speakeasy_client_sdk/models/shared/versionmetadata.rb +39 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/versionmetadata_input.rb +4 -5
- data/lib/speakeasy_client_sdk/models/shared.rb +32 -0
- data/lib/{sdk → speakeasy_client_sdk}/requests.rb +24 -18
- data/lib/{sdk → speakeasy_client_sdk}/schemas.rb +62 -45
- data/lib/{sdk → speakeasy_client_sdk}/sdk.rb +18 -37
- data/lib/{sdk → speakeasy_client_sdk}/sdkconfiguration.rb +11 -8
- data/lib/{sdk → speakeasy_client_sdk}/utils/utils.rb +2 -2
- data/lib/speakeasy_client_sdk_ruby.rb +14 -66
- metadata +107 -67
- data/lib/sdk/models/operations/deleteapi.rb +0 -52
- data/lib/sdk/models/operations/deleteapiendpoint.rb +0 -55
- data/lib/sdk/models/operations/deleteschema.rb +0 -55
- data/lib/sdk/models/operations/deleteversionmetadata.rb +0 -58
- data/lib/sdk/models/operations/downloadschema.rb +0 -58
- data/lib/sdk/models/operations/downloadschemarevision.rb +0 -61
- data/lib/sdk/models/operations/findapiendpoint.rb +0 -59
- data/lib/sdk/models/operations/generateopenapispec.rb +0 -56
- data/lib/sdk/models/operations/generateopenapispecforapiendpoint.rb +0 -59
- data/lib/sdk/models/operations/generatepostmancollection.rb +0 -55
- data/lib/sdk/models/operations/generatepostmancollectionforapiendpoint.rb +0 -58
- data/lib/sdk/models/operations/generaterequestpostmancollection.rb +0 -52
- data/lib/sdk/models/operations/getallapiendpoints.rb +0 -52
- data/lib/sdk/models/operations/getallapiversions.rb +0 -72
- data/lib/sdk/models/operations/getallforversionapiendpoints.rb +0 -55
- data/lib/sdk/models/operations/getapiendpoint.rb +0 -59
- data/lib/sdk/models/operations/getapis.rb +0 -69
- data/lib/sdk/models/operations/getembedaccesstoken.rb +0 -60
- data/lib/sdk/models/operations/getrequestfromeventlog.rb +0 -53
- data/lib/sdk/models/operations/getschema.rb +0 -56
- data/lib/sdk/models/operations/getschemadiff.rb +0 -62
- data/lib/sdk/models/operations/getschemarevision.rb +0 -59
- data/lib/sdk/models/operations/getschemas.rb +0 -55
- data/lib/sdk/models/operations/getversionmetadata.rb +0 -55
- data/lib/sdk/models/operations/insertversionmetadata.rb +0 -59
- data/lib/sdk/models/operations/queryeventlog.rb +0 -53
- data/lib/sdk/models/operations/registerschema.rb +0 -86
- data/lib/sdk/models/operations/revokeembedaccesstoken.rb +0 -49
- data/lib/sdk/models/operations/runplugin.rb +0 -56
- data/lib/sdk/models/operations/upsertapi.rb +0 -56
- data/lib/sdk/models/operations/upsertapiendpoint.rb +0 -62
- data/lib/sdk/models/operations/upsertplugin.rb +0 -39
- data/lib/sdk/models/shared/apiendpoint.rb +0 -55
- data/lib/sdk/models/shared/boundedrequest.rb +0 -64
- data/lib/sdk/models/shared/embedtoken.rb +0 -52
- data/lib/sdk/models/shared/plugin.rb +0 -43
- data/lib/sdk/models/shared/schema.rb +0 -40
- data/lib/sdk/models/shared/schemadiff.rb +0 -48
- data/lib/sdk/models/shared/versionmetadata.rb +0 -40
- data/lib/sdk/plugins.rb +0 -142
- /data/lib/{sdk → speakeasy_client_sdk}/utils/metadata_fields.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44f27e3e09a07cc014a50265e1da6a0d87f0f31ff10748fa79c910bba8ca3329
|
|
4
|
+
data.tar.gz: cf31e4ea81072802c9c823f01cf1f56ac49b74d8288ab74a207606debc91d61a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b33c3cc5fef52f6636ff17d3d69b78b6b05a00e75fc644193e69a633e7aaba3b6151defc70de7fd18ce7ae720624839784fb38e113cbffa847617c3be940d6e7
|
|
7
|
+
data.tar.gz: 55beebeb06f55c89f42271c77da97d03be1875696a45001aeb341bd7c0c23dc19cba149b9b7f586efe5d026e0818dfb5e630c7b0ab33fc02d2fbd40d4d5ed9d1
|
|
@@ -10,24 +10,27 @@ require 'sorbet-runtime'
|
|
|
10
10
|
module SpeakeasyClientSDK
|
|
11
11
|
extend T::Sig
|
|
12
12
|
class ApiEndpoints
|
|
13
|
-
# REST APIs for managing ApiEndpoint entities
|
|
14
13
|
extend T::Sig
|
|
14
|
+
# REST APIs for managing ApiEndpoint entities
|
|
15
|
+
|
|
15
16
|
sig { params(sdk_config: SDKConfiguration).void }
|
|
16
17
|
def initialize(sdk_config)
|
|
17
18
|
@sdk_configuration = sdk_config
|
|
18
19
|
end
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiEndpointRequest)).returns(Utils::FieldAugmented) }
|
|
21
23
|
def delete_api_endpoint(request)
|
|
22
24
|
# delete_api_endpoint - Delete an ApiEndpoint.
|
|
23
25
|
# Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore).
|
|
24
26
|
url, params = @sdk_configuration.get_server_details
|
|
25
27
|
base_url = Utils.template_url(url, params)
|
|
26
28
|
url = Utils.generate_url(
|
|
27
|
-
Operations::DeleteApiEndpointRequest,
|
|
29
|
+
::SpeakeasyClientSDK::Operations::DeleteApiEndpointRequest,
|
|
28
30
|
base_url,
|
|
29
31
|
'/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}',
|
|
30
|
-
request
|
|
32
|
+
request,
|
|
33
|
+
@sdk_configuration.globals
|
|
31
34
|
)
|
|
32
35
|
headers = {}
|
|
33
36
|
headers['Accept'] = 'application/json'
|
|
@@ -40,21 +43,22 @@ module SpeakeasyClientSDK
|
|
|
40
43
|
|
|
41
44
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
42
45
|
|
|
43
|
-
res = Operations::DeleteApiEndpointResponse.new(
|
|
46
|
+
res = ::SpeakeasyClientSDK::Operations::DeleteApiEndpointResponse.new(
|
|
44
47
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
45
48
|
)
|
|
46
49
|
if r.status == 200
|
|
47
50
|
else
|
|
48
51
|
|
|
49
52
|
if Utils.match_content_type(content_type, 'application/json')
|
|
50
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
53
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
51
54
|
res.error = out
|
|
52
55
|
end
|
|
53
56
|
end
|
|
54
57
|
res
|
|
55
58
|
end
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
|
|
61
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::FindApiEndpointRequest)).returns(Utils::FieldAugmented) }
|
|
58
62
|
def find_api_endpoint(request)
|
|
59
63
|
# find_api_endpoint - Find an ApiEndpoint via its displayName.
|
|
60
64
|
# Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema).
|
|
@@ -62,10 +66,11 @@ module SpeakeasyClientSDK
|
|
|
62
66
|
url, params = @sdk_configuration.get_server_details
|
|
63
67
|
base_url = Utils.template_url(url, params)
|
|
64
68
|
url = Utils.generate_url(
|
|
65
|
-
Operations::FindApiEndpointRequest,
|
|
69
|
+
::SpeakeasyClientSDK::Operations::FindApiEndpointRequest,
|
|
66
70
|
base_url,
|
|
67
71
|
'/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}',
|
|
68
|
-
request
|
|
72
|
+
request,
|
|
73
|
+
@sdk_configuration.globals
|
|
69
74
|
)
|
|
70
75
|
headers = {}
|
|
71
76
|
headers['Accept'] = 'application/json'
|
|
@@ -78,25 +83,26 @@ module SpeakeasyClientSDK
|
|
|
78
83
|
|
|
79
84
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
80
85
|
|
|
81
|
-
res = Operations::FindApiEndpointResponse.new(
|
|
86
|
+
res = ::SpeakeasyClientSDK::Operations::FindApiEndpointResponse.new(
|
|
82
87
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
83
88
|
)
|
|
84
89
|
if r.status == 200
|
|
85
90
|
if Utils.match_content_type(content_type, 'application/json')
|
|
86
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::ApiEndpoint)
|
|
91
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ApiEndpoint)
|
|
87
92
|
res.api_endpoint = out
|
|
88
93
|
end
|
|
89
94
|
else
|
|
90
95
|
|
|
91
96
|
if Utils.match_content_type(content_type, 'application/json')
|
|
92
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
97
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
93
98
|
res.error = out
|
|
94
99
|
end
|
|
95
100
|
end
|
|
96
101
|
res
|
|
97
102
|
end
|
|
98
103
|
|
|
99
|
-
|
|
104
|
+
|
|
105
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest)).returns(Utils::FieldAugmented) }
|
|
100
106
|
def generate_open_api_spec_for_api_endpoint(request)
|
|
101
107
|
# generate_open_api_spec_for_api_endpoint - Generate an OpenAPI specification for a particular ApiEndpoint.
|
|
102
108
|
# This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document.
|
|
@@ -104,10 +110,11 @@ module SpeakeasyClientSDK
|
|
|
104
110
|
url, params = @sdk_configuration.get_server_details
|
|
105
111
|
base_url = Utils.template_url(url, params)
|
|
106
112
|
url = Utils.generate_url(
|
|
107
|
-
Operations::GenerateOpenApiSpecForApiEndpointRequest,
|
|
113
|
+
::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest,
|
|
108
114
|
base_url,
|
|
109
115
|
'/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi',
|
|
110
|
-
request
|
|
116
|
+
request,
|
|
117
|
+
@sdk_configuration.globals
|
|
111
118
|
)
|
|
112
119
|
headers = {}
|
|
113
120
|
headers['Accept'] = 'application/json'
|
|
@@ -120,35 +127,37 @@ module SpeakeasyClientSDK
|
|
|
120
127
|
|
|
121
128
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
122
129
|
|
|
123
|
-
res = Operations::GenerateOpenApiSpecForApiEndpointResponse.new(
|
|
130
|
+
res = ::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointResponse.new(
|
|
124
131
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
125
132
|
)
|
|
126
133
|
if r.status == 200
|
|
127
134
|
if Utils.match_content_type(content_type, 'application/json')
|
|
128
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::GenerateOpenApiSpecDiff)
|
|
135
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::GenerateOpenApiSpecDiff)
|
|
129
136
|
res.generate_open_api_spec_diff = out
|
|
130
137
|
end
|
|
131
138
|
else
|
|
132
139
|
|
|
133
140
|
if Utils.match_content_type(content_type, 'application/json')
|
|
134
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
141
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
135
142
|
res.error = out
|
|
136
143
|
end
|
|
137
144
|
end
|
|
138
145
|
res
|
|
139
146
|
end
|
|
140
147
|
|
|
141
|
-
|
|
148
|
+
|
|
149
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest)).returns(Utils::FieldAugmented) }
|
|
142
150
|
def generate_postman_collection_for_api_endpoint(request)
|
|
143
151
|
# generate_postman_collection_for_api_endpoint - Generate a Postman collection for a particular ApiEndpoint.
|
|
144
152
|
# Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document.
|
|
145
153
|
url, params = @sdk_configuration.get_server_details
|
|
146
154
|
base_url = Utils.template_url(url, params)
|
|
147
155
|
url = Utils.generate_url(
|
|
148
|
-
Operations::GeneratePostmanCollectionForApiEndpointRequest,
|
|
156
|
+
::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest,
|
|
149
157
|
base_url,
|
|
150
158
|
'/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman',
|
|
151
|
-
request
|
|
159
|
+
request,
|
|
160
|
+
@sdk_configuration.globals
|
|
152
161
|
)
|
|
153
162
|
headers = {}
|
|
154
163
|
headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0'
|
|
@@ -161,7 +170,7 @@ module SpeakeasyClientSDK
|
|
|
161
170
|
|
|
162
171
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
163
172
|
|
|
164
|
-
res = Operations::GeneratePostmanCollectionForApiEndpointResponse.new(
|
|
173
|
+
res = ::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointResponse.new(
|
|
165
174
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
166
175
|
)
|
|
167
176
|
if r.status == 200
|
|
@@ -170,23 +179,25 @@ module SpeakeasyClientSDK
|
|
|
170
179
|
else
|
|
171
180
|
|
|
172
181
|
if Utils.match_content_type(content_type, 'application/json')
|
|
173
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
182
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
174
183
|
res.error = out
|
|
175
184
|
end
|
|
176
185
|
end
|
|
177
186
|
res
|
|
178
187
|
end
|
|
179
188
|
|
|
180
|
-
|
|
189
|
+
|
|
190
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiEndpointsRequest)).returns(Utils::FieldAugmented) }
|
|
181
191
|
def get_all_api_endpoints(request)
|
|
182
192
|
# get_all_api_endpoints - Get all Api endpoints for a particular apiID.
|
|
183
193
|
url, params = @sdk_configuration.get_server_details
|
|
184
194
|
base_url = Utils.template_url(url, params)
|
|
185
195
|
url = Utils.generate_url(
|
|
186
|
-
Operations::GetAllApiEndpointsRequest,
|
|
196
|
+
::SpeakeasyClientSDK::Operations::GetAllApiEndpointsRequest,
|
|
187
197
|
base_url,
|
|
188
198
|
'/v1/apis/{apiID}/api_endpoints',
|
|
189
|
-
request
|
|
199
|
+
request,
|
|
200
|
+
@sdk_configuration.globals
|
|
190
201
|
)
|
|
191
202
|
headers = {}
|
|
192
203
|
headers['Accept'] = 'application/json'
|
|
@@ -199,34 +210,36 @@ module SpeakeasyClientSDK
|
|
|
199
210
|
|
|
200
211
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
201
212
|
|
|
202
|
-
res = Operations::GetAllApiEndpointsResponse.new(
|
|
213
|
+
res = ::SpeakeasyClientSDK::Operations::GetAllApiEndpointsResponse.new(
|
|
203
214
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
204
215
|
)
|
|
205
216
|
if r.status == 200
|
|
206
217
|
if Utils.match_content_type(content_type, 'application/json')
|
|
207
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::ApiEndpoint])
|
|
208
|
-
res.
|
|
218
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::ApiEndpoint])
|
|
219
|
+
res.api_endpoints = out
|
|
209
220
|
end
|
|
210
221
|
else
|
|
211
222
|
|
|
212
223
|
if Utils.match_content_type(content_type, 'application/json')
|
|
213
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
224
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
214
225
|
res.error = out
|
|
215
226
|
end
|
|
216
227
|
end
|
|
217
228
|
res
|
|
218
229
|
end
|
|
219
230
|
|
|
220
|
-
|
|
231
|
+
|
|
232
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsRequest)).returns(Utils::FieldAugmented) }
|
|
221
233
|
def get_all_for_version_api_endpoints(request)
|
|
222
234
|
# get_all_for_version_api_endpoints - Get all ApiEndpoints for a particular apiID and versionID.
|
|
223
235
|
url, params = @sdk_configuration.get_server_details
|
|
224
236
|
base_url = Utils.template_url(url, params)
|
|
225
237
|
url = Utils.generate_url(
|
|
226
|
-
Operations::GetAllForVersionApiEndpointsRequest,
|
|
238
|
+
::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsRequest,
|
|
227
239
|
base_url,
|
|
228
240
|
'/v1/apis/{apiID}/version/{versionID}/api_endpoints',
|
|
229
|
-
request
|
|
241
|
+
request,
|
|
242
|
+
@sdk_configuration.globals
|
|
230
243
|
)
|
|
231
244
|
headers = {}
|
|
232
245
|
headers['Accept'] = 'application/json'
|
|
@@ -239,34 +252,36 @@ module SpeakeasyClientSDK
|
|
|
239
252
|
|
|
240
253
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
241
254
|
|
|
242
|
-
res = Operations::GetAllForVersionApiEndpointsResponse.new(
|
|
255
|
+
res = ::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsResponse.new(
|
|
243
256
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
244
257
|
)
|
|
245
258
|
if r.status == 200
|
|
246
259
|
if Utils.match_content_type(content_type, 'application/json')
|
|
247
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::ApiEndpoint])
|
|
248
|
-
res.
|
|
260
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::ApiEndpoint])
|
|
261
|
+
res.api_endpoints = out
|
|
249
262
|
end
|
|
250
263
|
else
|
|
251
264
|
|
|
252
265
|
if Utils.match_content_type(content_type, 'application/json')
|
|
253
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
266
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
254
267
|
res.error = out
|
|
255
268
|
end
|
|
256
269
|
end
|
|
257
270
|
res
|
|
258
271
|
end
|
|
259
272
|
|
|
260
|
-
|
|
273
|
+
|
|
274
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApiEndpointRequest)).returns(Utils::FieldAugmented) }
|
|
261
275
|
def get_api_endpoint(request)
|
|
262
276
|
# get_api_endpoint - Get an ApiEndpoint.
|
|
263
277
|
url, params = @sdk_configuration.get_server_details
|
|
264
278
|
base_url = Utils.template_url(url, params)
|
|
265
279
|
url = Utils.generate_url(
|
|
266
|
-
Operations::GetApiEndpointRequest,
|
|
280
|
+
::SpeakeasyClientSDK::Operations::GetApiEndpointRequest,
|
|
267
281
|
base_url,
|
|
268
282
|
'/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}',
|
|
269
|
-
request
|
|
283
|
+
request,
|
|
284
|
+
@sdk_configuration.globals
|
|
270
285
|
)
|
|
271
286
|
headers = {}
|
|
272
287
|
headers['Accept'] = 'application/json'
|
|
@@ -279,35 +294,37 @@ module SpeakeasyClientSDK
|
|
|
279
294
|
|
|
280
295
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
281
296
|
|
|
282
|
-
res = Operations::GetApiEndpointResponse.new(
|
|
297
|
+
res = ::SpeakeasyClientSDK::Operations::GetApiEndpointResponse.new(
|
|
283
298
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
284
299
|
)
|
|
285
300
|
if r.status == 200
|
|
286
301
|
if Utils.match_content_type(content_type, 'application/json')
|
|
287
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::ApiEndpoint)
|
|
302
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ApiEndpoint)
|
|
288
303
|
res.api_endpoint = out
|
|
289
304
|
end
|
|
290
305
|
else
|
|
291
306
|
|
|
292
307
|
if Utils.match_content_type(content_type, 'application/json')
|
|
293
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
308
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
294
309
|
res.error = out
|
|
295
310
|
end
|
|
296
311
|
end
|
|
297
312
|
res
|
|
298
313
|
end
|
|
299
314
|
|
|
300
|
-
|
|
315
|
+
|
|
316
|
+
sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiEndpointRequest).returns(Utils::FieldAugmented) }
|
|
301
317
|
def upsert_api_endpoint(request)
|
|
302
318
|
# upsert_api_endpoint - Upsert an ApiEndpoint.
|
|
303
319
|
# Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated.
|
|
304
320
|
url, params = @sdk_configuration.get_server_details
|
|
305
321
|
base_url = Utils.template_url(url, params)
|
|
306
322
|
url = Utils.generate_url(
|
|
307
|
-
Operations::UpsertApiEndpointRequest,
|
|
323
|
+
::SpeakeasyClientSDK::Operations::UpsertApiEndpointRequest,
|
|
308
324
|
base_url,
|
|
309
325
|
'/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}',
|
|
310
|
-
request
|
|
326
|
+
request,
|
|
327
|
+
@sdk_configuration.globals
|
|
311
328
|
)
|
|
312
329
|
headers = {}
|
|
313
330
|
req_content_type, data, form = Utils.serialize_request_body(request, :api_endpoint, :json)
|
|
@@ -330,18 +347,18 @@ module SpeakeasyClientSDK
|
|
|
330
347
|
|
|
331
348
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
332
349
|
|
|
333
|
-
res = Operations::UpsertApiEndpointResponse.new(
|
|
350
|
+
res = ::SpeakeasyClientSDK::Operations::UpsertApiEndpointResponse.new(
|
|
334
351
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
335
352
|
)
|
|
336
353
|
if r.status == 200
|
|
337
354
|
if Utils.match_content_type(content_type, 'application/json')
|
|
338
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::ApiEndpoint)
|
|
355
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ApiEndpoint)
|
|
339
356
|
res.api_endpoint = out
|
|
340
357
|
end
|
|
341
358
|
else
|
|
342
359
|
|
|
343
360
|
if Utils.match_content_type(content_type, 'application/json')
|
|
344
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
361
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
345
362
|
res.error = out
|
|
346
363
|
end
|
|
347
364
|
end
|
|
@@ -10,24 +10,27 @@ require 'sorbet-runtime'
|
|
|
10
10
|
module SpeakeasyClientSDK
|
|
11
11
|
extend T::Sig
|
|
12
12
|
class Apis
|
|
13
|
-
# REST APIs for managing Api entities
|
|
14
13
|
extend T::Sig
|
|
14
|
+
# REST APIs for managing Api entities
|
|
15
|
+
|
|
15
16
|
sig { params(sdk_config: SDKConfiguration).void }
|
|
16
17
|
def initialize(sdk_config)
|
|
17
18
|
@sdk_configuration = sdk_config
|
|
18
19
|
end
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiRequest)).returns(Utils::FieldAugmented) }
|
|
21
23
|
def delete_api(request)
|
|
22
24
|
# delete_api - Delete an Api.
|
|
23
25
|
# Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore).
|
|
24
26
|
url, params = @sdk_configuration.get_server_details
|
|
25
27
|
base_url = Utils.template_url(url, params)
|
|
26
28
|
url = Utils.generate_url(
|
|
27
|
-
Operations::DeleteApiRequest,
|
|
29
|
+
::SpeakeasyClientSDK::Operations::DeleteApiRequest,
|
|
28
30
|
base_url,
|
|
29
31
|
'/v1/apis/{apiID}/version/{versionID}',
|
|
30
|
-
request
|
|
32
|
+
request,
|
|
33
|
+
@sdk_configuration.globals
|
|
31
34
|
)
|
|
32
35
|
headers = {}
|
|
33
36
|
headers['Accept'] = 'application/json'
|
|
@@ -40,21 +43,22 @@ module SpeakeasyClientSDK
|
|
|
40
43
|
|
|
41
44
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
42
45
|
|
|
43
|
-
res = Operations::DeleteApiResponse.new(
|
|
46
|
+
res = ::SpeakeasyClientSDK::Operations::DeleteApiResponse.new(
|
|
44
47
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
45
48
|
)
|
|
46
49
|
if r.status == 200
|
|
47
50
|
else
|
|
48
51
|
|
|
49
52
|
if Utils.match_content_type(content_type, 'application/json')
|
|
50
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
53
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
51
54
|
res.error = out
|
|
52
55
|
end
|
|
53
56
|
end
|
|
54
57
|
res
|
|
55
58
|
end
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
|
|
61
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecRequest)).returns(Utils::FieldAugmented) }
|
|
58
62
|
def generate_open_api_spec(request)
|
|
59
63
|
# generate_open_api_spec - Generate an OpenAPI specification for a particular Api.
|
|
60
64
|
# This endpoint will generate any missing operations in any registered OpenAPI document if the operation does not already exist in the document.
|
|
@@ -62,10 +66,11 @@ module SpeakeasyClientSDK
|
|
|
62
66
|
url, params = @sdk_configuration.get_server_details
|
|
63
67
|
base_url = Utils.template_url(url, params)
|
|
64
68
|
url = Utils.generate_url(
|
|
65
|
-
Operations::GenerateOpenApiSpecRequest,
|
|
69
|
+
::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecRequest,
|
|
66
70
|
base_url,
|
|
67
71
|
'/v1/apis/{apiID}/version/{versionID}/generate/openapi',
|
|
68
|
-
request
|
|
72
|
+
request,
|
|
73
|
+
@sdk_configuration.globals
|
|
69
74
|
)
|
|
70
75
|
headers = {}
|
|
71
76
|
headers['Accept'] = 'application/json'
|
|
@@ -78,35 +83,37 @@ module SpeakeasyClientSDK
|
|
|
78
83
|
|
|
79
84
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
80
85
|
|
|
81
|
-
res = Operations::GenerateOpenApiSpecResponse.new(
|
|
86
|
+
res = ::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecResponse.new(
|
|
82
87
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
83
88
|
)
|
|
84
89
|
if r.status == 200
|
|
85
90
|
if Utils.match_content_type(content_type, 'application/json')
|
|
86
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::GenerateOpenApiSpecDiff)
|
|
91
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::GenerateOpenApiSpecDiff)
|
|
87
92
|
res.generate_open_api_spec_diff = out
|
|
88
93
|
end
|
|
89
94
|
else
|
|
90
95
|
|
|
91
96
|
if Utils.match_content_type(content_type, 'application/json')
|
|
92
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
97
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
93
98
|
res.error = out
|
|
94
99
|
end
|
|
95
100
|
end
|
|
96
101
|
res
|
|
97
102
|
end
|
|
98
103
|
|
|
99
|
-
|
|
104
|
+
|
|
105
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionRequest)).returns(Utils::FieldAugmented) }
|
|
100
106
|
def generate_postman_collection(request)
|
|
101
107
|
# generate_postman_collection - Generate a Postman collection for a particular Api.
|
|
102
108
|
# Generates a postman collection containing all endpoints for a particular API. Includes variables produced for any path/query/header parameters included in the OpenAPI document.
|
|
103
109
|
url, params = @sdk_configuration.get_server_details
|
|
104
110
|
base_url = Utils.template_url(url, params)
|
|
105
111
|
url = Utils.generate_url(
|
|
106
|
-
Operations::GeneratePostmanCollectionRequest,
|
|
112
|
+
::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionRequest,
|
|
107
113
|
base_url,
|
|
108
114
|
'/v1/apis/{apiID}/version/{versionID}/generate/postman',
|
|
109
|
-
request
|
|
115
|
+
request,
|
|
116
|
+
@sdk_configuration.globals
|
|
110
117
|
)
|
|
111
118
|
headers = {}
|
|
112
119
|
headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0'
|
|
@@ -119,7 +126,7 @@ module SpeakeasyClientSDK
|
|
|
119
126
|
|
|
120
127
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
121
128
|
|
|
122
|
-
res = Operations::GeneratePostmanCollectionResponse.new(
|
|
129
|
+
res = ::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionResponse.new(
|
|
123
130
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
124
131
|
)
|
|
125
132
|
if r.status == 200
|
|
@@ -128,14 +135,15 @@ module SpeakeasyClientSDK
|
|
|
128
135
|
else
|
|
129
136
|
|
|
130
137
|
if Utils.match_content_type(content_type, 'application/json')
|
|
131
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
138
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
132
139
|
res.error = out
|
|
133
140
|
end
|
|
134
141
|
end
|
|
135
142
|
res
|
|
136
143
|
end
|
|
137
144
|
|
|
138
|
-
|
|
145
|
+
|
|
146
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest)).returns(Utils::FieldAugmented) }
|
|
139
147
|
def get_all_api_versions(request)
|
|
140
148
|
# get_all_api_versions - Get all Api versions for a particular ApiEndpoint.
|
|
141
149
|
# Get all Api versions for a particular ApiEndpoint.
|
|
@@ -143,13 +151,14 @@ module SpeakeasyClientSDK
|
|
|
143
151
|
url, params = @sdk_configuration.get_server_details
|
|
144
152
|
base_url = Utils.template_url(url, params)
|
|
145
153
|
url = Utils.generate_url(
|
|
146
|
-
Operations::GetAllApiVersionsRequest,
|
|
154
|
+
::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest,
|
|
147
155
|
base_url,
|
|
148
156
|
'/v1/apis/{apiID}',
|
|
149
|
-
request
|
|
157
|
+
request,
|
|
158
|
+
@sdk_configuration.globals
|
|
150
159
|
)
|
|
151
160
|
headers = {}
|
|
152
|
-
query_params = Utils.get_query_params(Operations::GetAllApiVersionsRequest, request)
|
|
161
|
+
query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest, request, @sdk_configuration.globals)
|
|
153
162
|
headers['Accept'] = 'application/json'
|
|
154
163
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
155
164
|
|
|
@@ -161,25 +170,26 @@ module SpeakeasyClientSDK
|
|
|
161
170
|
|
|
162
171
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
163
172
|
|
|
164
|
-
res = Operations::GetAllApiVersionsResponse.new(
|
|
173
|
+
res = ::SpeakeasyClientSDK::Operations::GetAllApiVersionsResponse.new(
|
|
165
174
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
166
175
|
)
|
|
167
176
|
if r.status == 200
|
|
168
177
|
if Utils.match_content_type(content_type, 'application/json')
|
|
169
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::Api])
|
|
170
|
-
res.
|
|
178
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::Api])
|
|
179
|
+
res.apis = out
|
|
171
180
|
end
|
|
172
181
|
else
|
|
173
182
|
|
|
174
183
|
if Utils.match_content_type(content_type, 'application/json')
|
|
175
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
184
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
176
185
|
res.error = out
|
|
177
186
|
end
|
|
178
187
|
end
|
|
179
188
|
res
|
|
180
189
|
end
|
|
181
190
|
|
|
182
|
-
|
|
191
|
+
|
|
192
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApisRequest)).returns(Utils::FieldAugmented) }
|
|
183
193
|
def get_apis(request)
|
|
184
194
|
# get_apis - Get a list of Apis for a given workspace
|
|
185
195
|
# Get a list of all Apis and their versions for a given workspace.
|
|
@@ -188,7 +198,7 @@ module SpeakeasyClientSDK
|
|
|
188
198
|
base_url = Utils.template_url(url, params)
|
|
189
199
|
url = "#{base_url}/v1/apis"
|
|
190
200
|
headers = {}
|
|
191
|
-
query_params = Utils.get_query_params(Operations::GetApisRequest, request)
|
|
201
|
+
query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::GetApisRequest, request, @sdk_configuration.globals)
|
|
192
202
|
headers['Accept'] = 'application/json'
|
|
193
203
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
194
204
|
|
|
@@ -200,25 +210,26 @@ module SpeakeasyClientSDK
|
|
|
200
210
|
|
|
201
211
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
202
212
|
|
|
203
|
-
res = Operations::GetApisResponse.new(
|
|
213
|
+
res = ::SpeakeasyClientSDK::Operations::GetApisResponse.new(
|
|
204
214
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
205
215
|
)
|
|
206
216
|
if r.status == 200
|
|
207
217
|
if Utils.match_content_type(content_type, 'application/json')
|
|
208
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::Api])
|
|
209
|
-
res.
|
|
218
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::Api])
|
|
219
|
+
res.apis = out
|
|
210
220
|
end
|
|
211
221
|
else
|
|
212
222
|
|
|
213
223
|
if Utils.match_content_type(content_type, 'application/json')
|
|
214
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
224
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
215
225
|
res.error = out
|
|
216
226
|
end
|
|
217
227
|
end
|
|
218
228
|
res
|
|
219
229
|
end
|
|
220
230
|
|
|
221
|
-
|
|
231
|
+
|
|
232
|
+
sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiRequest).returns(Utils::FieldAugmented) }
|
|
222
233
|
def upsert_api(request)
|
|
223
234
|
# upsert_api - Upsert an Api
|
|
224
235
|
# Upsert an Api. If the Api does not exist, it will be created.
|
|
@@ -226,10 +237,11 @@ module SpeakeasyClientSDK
|
|
|
226
237
|
url, params = @sdk_configuration.get_server_details
|
|
227
238
|
base_url = Utils.template_url(url, params)
|
|
228
239
|
url = Utils.generate_url(
|
|
229
|
-
Operations::UpsertApiRequest,
|
|
240
|
+
::SpeakeasyClientSDK::Operations::UpsertApiRequest,
|
|
230
241
|
base_url,
|
|
231
242
|
'/v1/apis/{apiID}',
|
|
232
|
-
request
|
|
243
|
+
request,
|
|
244
|
+
@sdk_configuration.globals
|
|
233
245
|
)
|
|
234
246
|
headers = {}
|
|
235
247
|
req_content_type, data, form = Utils.serialize_request_body(request, :api, :json)
|
|
@@ -252,18 +264,18 @@ module SpeakeasyClientSDK
|
|
|
252
264
|
|
|
253
265
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
|
254
266
|
|
|
255
|
-
res = Operations::UpsertApiResponse.new(
|
|
267
|
+
res = ::SpeakeasyClientSDK::Operations::UpsertApiResponse.new(
|
|
256
268
|
status_code: r.status, content_type: content_type, raw_response: r
|
|
257
269
|
)
|
|
258
270
|
if r.status == 200
|
|
259
271
|
if Utils.match_content_type(content_type, 'application/json')
|
|
260
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Api)
|
|
272
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Api)
|
|
261
273
|
res.api = out
|
|
262
274
|
end
|
|
263
275
|
else
|
|
264
276
|
|
|
265
277
|
if Utils.match_content_type(content_type, 'application/json')
|
|
266
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
|
278
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
|
267
279
|
res.error = out
|
|
268
280
|
end
|
|
269
281
|
end
|