speakeasy_client_sdk_ruby 4.0.4 → 4.0.5
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/speakeasy_client_sdk/apiendpoints.rb +8 -8
- data/lib/speakeasy_client_sdk/apis.rb +6 -6
- data/lib/speakeasy_client_sdk/auth.rb +2 -2
- data/lib/speakeasy_client_sdk/embeds.rb +3 -3
- data/lib/speakeasy_client_sdk/events.rb +1 -1
- data/lib/speakeasy_client_sdk/metadata.rb +3 -3
- data/lib/speakeasy_client_sdk/requests.rb +3 -3
- data/lib/speakeasy_client_sdk/schemas.rb +8 -8
- data/lib/speakeasy_client_sdk/sdkconfiguration.rb +3 -3
- data/lib/speakeasy_client_sdk/utils/metadata_fields.rb +8 -12
- data/lib/speakeasy_client_sdk/utils/t.rb +59 -0
- data/lib/speakeasy_client_sdk/utils/utils.rb +8 -13
- data/lib/speakeasy_client_sdk_ruby.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e07d745f43fb772387d21197644f1ee5fe0e7e6b676b4129fd5be2db622fd81
|
4
|
+
data.tar.gz: a3d5ded5488fed665588ed7e833fa0b340c165b09e94864fb68087520c61bef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33dcdcd58bfd8d10be5626e3823078f2a7e95390c078ede84081eafc4c9ce3b337c946cccb50ebb9f7457ba8e528d2320030b4d549776e06618a1f1866806963
|
7
|
+
data.tar.gz: be08182f5bc031896ffbb075c923ae4a75356b36e00e1b90fba79f81d4f2b8d66695e11a99e6a3bcbf11cd11daf413991b381a2786dd52194bf8b3f437231374
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiEndpointRequest)).returns(
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiEndpointRequest)).returns(::SpeakeasyClientSDK::Operations::DeleteApiEndpointResponse) }
|
23
23
|
def delete_api_endpoint(request)
|
24
24
|
# delete_api_endpoint - Delete an ApiEndpoint.
|
25
25
|
# Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore).
|
@@ -58,7 +58,7 @@ module SpeakeasyClientSDK
|
|
58
58
|
end
|
59
59
|
|
60
60
|
|
61
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::FindApiEndpointRequest)).returns(
|
61
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::FindApiEndpointRequest)).returns(::SpeakeasyClientSDK::Operations::FindApiEndpointResponse) }
|
62
62
|
def find_api_endpoint(request)
|
63
63
|
# find_api_endpoint - Find an ApiEndpoint via its displayName.
|
64
64
|
# Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema).
|
@@ -102,7 +102,7 @@ module SpeakeasyClientSDK
|
|
102
102
|
end
|
103
103
|
|
104
104
|
|
105
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest)).returns(
|
105
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest)).returns(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointResponse) }
|
106
106
|
def generate_open_api_spec_for_api_endpoint(request)
|
107
107
|
# generate_open_api_spec_for_api_endpoint - Generate an OpenAPI specification for a particular ApiEndpoint.
|
108
108
|
# This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document.
|
@@ -146,7 +146,7 @@ module SpeakeasyClientSDK
|
|
146
146
|
end
|
147
147
|
|
148
148
|
|
149
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest)).returns(
|
149
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest)).returns(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointResponse) }
|
150
150
|
def generate_postman_collection_for_api_endpoint(request)
|
151
151
|
# generate_postman_collection_for_api_endpoint - Generate a Postman collection for a particular ApiEndpoint.
|
152
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.
|
@@ -187,7 +187,7 @@ module SpeakeasyClientSDK
|
|
187
187
|
end
|
188
188
|
|
189
189
|
|
190
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiEndpointsRequest)).returns(
|
190
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiEndpointsRequest)).returns(::SpeakeasyClientSDK::Operations::GetAllApiEndpointsResponse) }
|
191
191
|
def get_all_api_endpoints(request)
|
192
192
|
# get_all_api_endpoints - Get all Api endpoints for a particular apiID.
|
193
193
|
url, params = @sdk_configuration.get_server_details
|
@@ -229,7 +229,7 @@ module SpeakeasyClientSDK
|
|
229
229
|
end
|
230
230
|
|
231
231
|
|
232
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsRequest)).returns(
|
232
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsRequest)).returns(::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsResponse) }
|
233
233
|
def get_all_for_version_api_endpoints(request)
|
234
234
|
# get_all_for_version_api_endpoints - Get all ApiEndpoints for a particular apiID and versionID.
|
235
235
|
url, params = @sdk_configuration.get_server_details
|
@@ -271,7 +271,7 @@ module SpeakeasyClientSDK
|
|
271
271
|
end
|
272
272
|
|
273
273
|
|
274
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApiEndpointRequest)).returns(
|
274
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApiEndpointRequest)).returns(::SpeakeasyClientSDK::Operations::GetApiEndpointResponse) }
|
275
275
|
def get_api_endpoint(request)
|
276
276
|
# get_api_endpoint - Get an ApiEndpoint.
|
277
277
|
url, params = @sdk_configuration.get_server_details
|
@@ -313,7 +313,7 @@ module SpeakeasyClientSDK
|
|
313
313
|
end
|
314
314
|
|
315
315
|
|
316
|
-
sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiEndpointRequest).returns(
|
316
|
+
sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiEndpointRequest).returns(::SpeakeasyClientSDK::Operations::UpsertApiEndpointResponse) }
|
317
317
|
def upsert_api_endpoint(request)
|
318
318
|
# upsert_api_endpoint - Upsert an ApiEndpoint.
|
319
319
|
# Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated.
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiRequest)).returns(
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiRequest)).returns(::SpeakeasyClientSDK::Operations::DeleteApiResponse) }
|
23
23
|
def delete_api(request)
|
24
24
|
# delete_api - Delete an Api.
|
25
25
|
# Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore).
|
@@ -58,7 +58,7 @@ module SpeakeasyClientSDK
|
|
58
58
|
end
|
59
59
|
|
60
60
|
|
61
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecRequest)).returns(
|
61
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecRequest)).returns(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecResponse) }
|
62
62
|
def generate_open_api_spec(request)
|
63
63
|
# generate_open_api_spec - Generate an OpenAPI specification for a particular Api.
|
64
64
|
# This endpoint will generate any missing operations in any registered OpenAPI document if the operation does not already exist in the document.
|
@@ -102,7 +102,7 @@ module SpeakeasyClientSDK
|
|
102
102
|
end
|
103
103
|
|
104
104
|
|
105
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionRequest)).returns(
|
105
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionRequest)).returns(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionResponse) }
|
106
106
|
def generate_postman_collection(request)
|
107
107
|
# generate_postman_collection - Generate a Postman collection for a particular Api.
|
108
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.
|
@@ -143,7 +143,7 @@ module SpeakeasyClientSDK
|
|
143
143
|
end
|
144
144
|
|
145
145
|
|
146
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest)).returns(
|
146
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest)).returns(::SpeakeasyClientSDK::Operations::GetAllApiVersionsResponse) }
|
147
147
|
def get_all_api_versions(request)
|
148
148
|
# get_all_api_versions - Get all Api versions for a particular ApiEndpoint.
|
149
149
|
# Get all Api versions for a particular ApiEndpoint.
|
@@ -189,7 +189,7 @@ module SpeakeasyClientSDK
|
|
189
189
|
end
|
190
190
|
|
191
191
|
|
192
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApisRequest)).returns(
|
192
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApisRequest)).returns(::SpeakeasyClientSDK::Operations::GetApisResponse) }
|
193
193
|
def get_apis(request)
|
194
194
|
# get_apis - Get a list of Apis for a given workspace
|
195
195
|
# Get a list of all Apis and their versions for a given workspace.
|
@@ -229,7 +229,7 @@ module SpeakeasyClientSDK
|
|
229
229
|
end
|
230
230
|
|
231
231
|
|
232
|
-
sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiRequest).returns(
|
232
|
+
sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiRequest).returns(::SpeakeasyClientSDK::Operations::UpsertApiResponse) }
|
233
233
|
def upsert_api(request)
|
234
234
|
# upsert_api - Upsert an Api
|
235
235
|
# Upsert an Api. If the Api does not exist, it will be created.
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessRequest)).returns(
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessRequest)).returns(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessResponse) }
|
23
23
|
def get_workspace_access(request)
|
24
24
|
# get_workspace_access - Get access allowances for a particular workspace
|
25
25
|
# Checks if generation is permitted for a particular run of the CLI
|
@@ -57,7 +57,7 @@ module SpeakeasyClientSDK
|
|
57
57
|
end
|
58
58
|
|
59
59
|
|
60
|
-
sig { returns(::SpeakeasyClientSDK::
|
60
|
+
sig { returns(::SpeakeasyClientSDK::Operations::ValidateApiKeyResponse) }
|
61
61
|
def validate_api_key
|
62
62
|
# validate_api_key - Validate the current api key.
|
63
63
|
url, params = @sdk_configuration.get_server_details
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetEmbedAccessTokenRequest)).returns(
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetEmbedAccessTokenRequest)).returns(::SpeakeasyClientSDK::Operations::GetEmbedAccessTokenResponse) }
|
23
23
|
def get_embed_access_token(request)
|
24
24
|
# get_embed_access_token - Get an embed access token for the current workspace.
|
25
25
|
# Returns an embed access token for the current workspace. This can be used to authenticate access to externally embedded content.
|
@@ -59,7 +59,7 @@ module SpeakeasyClientSDK
|
|
59
59
|
end
|
60
60
|
|
61
61
|
|
62
|
-
sig { returns(::SpeakeasyClientSDK::
|
62
|
+
sig { returns(::SpeakeasyClientSDK::Operations::GetValidEmbedAccessTokensResponse) }
|
63
63
|
def get_valid_embed_access_tokens
|
64
64
|
# get_valid_embed_access_tokens - Get all valid embed access tokens for the current workspace.
|
65
65
|
url, params = @sdk_configuration.get_server_details
|
@@ -95,7 +95,7 @@ module SpeakeasyClientSDK
|
|
95
95
|
end
|
96
96
|
|
97
97
|
|
98
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::RevokeEmbedAccessTokenRequest)).returns(
|
98
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::RevokeEmbedAccessTokenRequest)).returns(::SpeakeasyClientSDK::Operations::RevokeEmbedAccessTokenResponse) }
|
99
99
|
def revoke_embed_access_token(request)
|
100
100
|
# revoke_embed_access_token - Revoke an embed access EmbedToken.
|
101
101
|
url, params = @sdk_configuration.get_server_details
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: ::SpeakeasyClientSDK::Operations::PostWorkspaceEventsRequest).returns(
|
22
|
+
sig { params(request: ::SpeakeasyClientSDK::Operations::PostWorkspaceEventsRequest).returns(::SpeakeasyClientSDK::Operations::PostWorkspaceEventsResponse) }
|
23
23
|
def post_workspace_events(request)
|
24
24
|
# post_workspace_events - Post events for a specific workspace
|
25
25
|
# Sends an array of events to be stored for a particular workspace.
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteVersionMetadataRequest)).returns(
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteVersionMetadataRequest)).returns(::SpeakeasyClientSDK::Operations::DeleteVersionMetadataResponse) }
|
23
23
|
def delete_version_metadata(request)
|
24
24
|
# delete_version_metadata - Delete metadata for a particular apiID and versionID.
|
25
25
|
url, params = @sdk_configuration.get_server_details
|
@@ -57,7 +57,7 @@ module SpeakeasyClientSDK
|
|
57
57
|
end
|
58
58
|
|
59
59
|
|
60
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetVersionMetadataRequest)).returns(
|
60
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetVersionMetadataRequest)).returns(::SpeakeasyClientSDK::Operations::GetVersionMetadataResponse) }
|
61
61
|
def get_version_metadata(request)
|
62
62
|
# get_version_metadata - Get all metadata for a particular apiID and versionID.
|
63
63
|
url, params = @sdk_configuration.get_server_details
|
@@ -99,7 +99,7 @@ module SpeakeasyClientSDK
|
|
99
99
|
end
|
100
100
|
|
101
101
|
|
102
|
-
sig { params(request: ::SpeakeasyClientSDK::Operations::InsertVersionMetadataRequest).returns(
|
102
|
+
sig { params(request: ::SpeakeasyClientSDK::Operations::InsertVersionMetadataRequest).returns(::SpeakeasyClientSDK::Operations::InsertVersionMetadataResponse) }
|
103
103
|
def insert_version_metadata(request)
|
104
104
|
# insert_version_metadata - Insert metadata for a particular apiID and versionID.
|
105
105
|
url, params = @sdk_configuration.get_server_details
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateRequestPostmanCollectionRequest)).returns(
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateRequestPostmanCollectionRequest)).returns(::SpeakeasyClientSDK::Operations::GenerateRequestPostmanCollectionResponse) }
|
23
23
|
def generate_request_postman_collection(request)
|
24
24
|
# generate_request_postman_collection - Generate a Postman collection for a particular request.
|
25
25
|
# Generates a Postman collection for a particular request.
|
@@ -61,7 +61,7 @@ module SpeakeasyClientSDK
|
|
61
61
|
end
|
62
62
|
|
63
63
|
|
64
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetRequestFromEventLogRequest)).returns(
|
64
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetRequestFromEventLogRequest)).returns(::SpeakeasyClientSDK::Operations::GetRequestFromEventLogResponse) }
|
65
65
|
def get_request_from_event_log(request)
|
66
66
|
# get_request_from_event_log - Get information about a particular request.
|
67
67
|
url, params = @sdk_configuration.get_server_details
|
@@ -103,7 +103,7 @@ module SpeakeasyClientSDK
|
|
103
103
|
end
|
104
104
|
|
105
105
|
|
106
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::QueryEventLogRequest)).returns(
|
106
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::QueryEventLogRequest)).returns(::SpeakeasyClientSDK::Operations::QueryEventLogResponse) }
|
107
107
|
def query_event_log(request)
|
108
108
|
# query_event_log - Query the event log to retrieve a list of requests.
|
109
109
|
# Supports retrieving a list of request captured by the SDK for this workspace.
|
@@ -19,7 +19,7 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteSchemaRequest)).returns(
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteSchemaRequest)).returns(::SpeakeasyClientSDK::Operations::DeleteSchemaResponse) }
|
23
23
|
def delete_schema(request)
|
24
24
|
# delete_schema - Delete a particular schema revision for an Api.
|
25
25
|
url, params = @sdk_configuration.get_server_details
|
@@ -57,7 +57,7 @@ module SpeakeasyClientSDK
|
|
57
57
|
end
|
58
58
|
|
59
59
|
|
60
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaRequest)).returns(
|
60
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaRequest)).returns(::SpeakeasyClientSDK::Operations::DownloadSchemaResponse) }
|
61
61
|
def download_schema(request)
|
62
62
|
# download_schema - Download the latest schema for a particular apiID.
|
63
63
|
url, params = @sdk_configuration.get_server_details
|
@@ -99,7 +99,7 @@ module SpeakeasyClientSDK
|
|
99
99
|
end
|
100
100
|
|
101
101
|
|
102
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionRequest)).returns(
|
102
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionRequest)).returns(::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionResponse) }
|
103
103
|
def download_schema_revision(request)
|
104
104
|
# download_schema_revision - Download a particular schema revision for an Api.
|
105
105
|
url, params = @sdk_configuration.get_server_details
|
@@ -141,7 +141,7 @@ module SpeakeasyClientSDK
|
|
141
141
|
end
|
142
142
|
|
143
143
|
|
144
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaRequest)).returns(
|
144
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaRequest)).returns(::SpeakeasyClientSDK::Operations::GetSchemaResponse) }
|
145
145
|
def get_schema(request)
|
146
146
|
# get_schema - Get information about the latest schema.
|
147
147
|
# Returns information about the last uploaded schema for a particular API version.
|
@@ -185,7 +185,7 @@ module SpeakeasyClientSDK
|
|
185
185
|
end
|
186
186
|
|
187
187
|
|
188
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaDiffRequest)).returns(
|
188
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaDiffRequest)).returns(::SpeakeasyClientSDK::Operations::GetSchemaDiffResponse) }
|
189
189
|
def get_schema_diff(request)
|
190
190
|
# get_schema_diff - Get a diff of two schema revisions for an Api.
|
191
191
|
url, params = @sdk_configuration.get_server_details
|
@@ -227,7 +227,7 @@ module SpeakeasyClientSDK
|
|
227
227
|
end
|
228
228
|
|
229
229
|
|
230
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaRevisionRequest)).returns(
|
230
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaRevisionRequest)).returns(::SpeakeasyClientSDK::Operations::GetSchemaRevisionResponse) }
|
231
231
|
def get_schema_revision(request)
|
232
232
|
# get_schema_revision - Get information about a particular schema revision for an Api.
|
233
233
|
# Returns information about the last uploaded schema for a particular schema revision.
|
@@ -271,7 +271,7 @@ module SpeakeasyClientSDK
|
|
271
271
|
end
|
272
272
|
|
273
273
|
|
274
|
-
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemasRequest)).returns(
|
274
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemasRequest)).returns(::SpeakeasyClientSDK::Operations::GetSchemasResponse) }
|
275
275
|
def get_schemas(request)
|
276
276
|
# get_schemas - Get information about all schemas associated with a particular apiID.
|
277
277
|
# Returns information the schemas associated with a particular apiID.
|
@@ -315,7 +315,7 @@ module SpeakeasyClientSDK
|
|
315
315
|
end
|
316
316
|
|
317
317
|
|
318
|
-
sig { params(request: ::SpeakeasyClientSDK::Operations::RegisterSchemaRequest).returns(
|
318
|
+
sig { params(request: ::SpeakeasyClientSDK::Operations::RegisterSchemaRequest).returns(::SpeakeasyClientSDK::Operations::RegisterSchemaResponse) }
|
319
319
|
def register_schema(request)
|
320
320
|
# register_schema - Register a schema.
|
321
321
|
# Allows uploading a schema for a particular API version.
|
@@ -41,9 +41,9 @@ module SpeakeasyClientSDK
|
|
41
41
|
@globals = globals.nil? ? {} : globals
|
42
42
|
@language = 'ruby'
|
43
43
|
@openapi_doc_version = '0.4.0'
|
44
|
-
@sdk_version = '4.0.
|
45
|
-
@gen_version = '2.
|
46
|
-
@user_agent = 'speakeasy-sdk/ruby 4.0.
|
44
|
+
@sdk_version = '4.0.5'
|
45
|
+
@gen_version = '2.263.3'
|
46
|
+
@user_agent = 'speakeasy-sdk/ruby 4.0.5 2.263.3 0.4.0 speakeasy_client_sdk_ruby'
|
47
47
|
end
|
48
48
|
|
49
49
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
@@ -62,28 +62,24 @@ module SpeakeasyClientSDK
|
|
62
62
|
end
|
63
63
|
fields.each do |field|
|
64
64
|
field_type = field.type
|
65
|
-
if
|
66
|
-
|
67
|
-
if type2.raw_type == NilClass
|
68
|
-
field_type = field.type.types[0]
|
69
|
-
field_type = field_type.raw_type if field_type.respond_to? :raw_type
|
70
|
-
end
|
65
|
+
if T.nilable? field_type
|
66
|
+
field_type = T.nilable_of(field_type)
|
71
67
|
end
|
72
68
|
|
73
|
-
|
74
69
|
key = "#{field.name}="
|
75
70
|
lookup = field.metadata.fetch(:format_json, {}).fetch(:letter_case, nil).call
|
76
71
|
value = d[lookup]
|
77
72
|
next if value.nil?
|
78
73
|
|
79
|
-
if
|
80
|
-
inner_type = field_type
|
74
|
+
if T.arr? field_type
|
75
|
+
inner_type = T.arr_of(field_type)
|
81
76
|
unmarshalled_array = value.map { |f| unmarshal_single(inner_type, f) }
|
82
77
|
to_build.send(key, unmarshalled_array)
|
83
|
-
elsif
|
84
|
-
|
78
|
+
elsif T.hash? field_type
|
79
|
+
val_type = T.hash_of(field_type)
|
80
|
+
|
85
81
|
# rubocop:disable Style/HashTransformValues
|
86
|
-
unmarshalled_hash = value.map { |k, v| [k, unmarshal_single(val_type
|
82
|
+
unmarshalled_hash = value.map { |k, v| [k, unmarshal_single(val_type, v)] }.to_h
|
87
83
|
# rubocop:enable Style/HashTransformValues
|
88
84
|
to_build.send(key, unmarshalled_hash)
|
89
85
|
else
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
module T
|
7
|
+
def self.arr?(t)
|
8
|
+
if t.respond_to? :underlying_class
|
9
|
+
return t.underlying_class == ::Array
|
10
|
+
end
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.arr_of(t)
|
15
|
+
get_raw_type(t.type)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.hash?(t)
|
19
|
+
if t.respond_to? :underlying_class
|
20
|
+
return t.underlying_class == ::Hash
|
21
|
+
end
|
22
|
+
false
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.hash_of(t)
|
26
|
+
get_raw_type(t.values)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.nilable?(t)
|
30
|
+
t.respond_to? :unwrap_nilable
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.nilable_of(t)
|
34
|
+
if t.respond_to? :unwrap_nilable
|
35
|
+
return simplify_type t.unwrap_nilable
|
36
|
+
end
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.simplifiable?(t)
|
41
|
+
return t.is_a? T::Types::Simple
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.simplify_type(t)
|
45
|
+
if t.is_a? T::Types::Simple
|
46
|
+
return t.raw_type
|
47
|
+
end
|
48
|
+
t
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.get_raw_type(t)
|
52
|
+
if t.respond_to? :raw_type
|
53
|
+
return t.raw_type
|
54
|
+
elsif t.respond_to? :raw_a
|
55
|
+
return T::Boolean if t.raw_a in [TrueClass, FalseClass]
|
56
|
+
end
|
57
|
+
t
|
58
|
+
end
|
59
|
+
end
|
@@ -742,7 +742,7 @@ module SpeakeasyClientSDK
|
|
742
742
|
end
|
743
743
|
end
|
744
744
|
|
745
|
-
sig { params(data:
|
745
|
+
sig { params(data: Object, type: Object).returns(Object) }
|
746
746
|
def self.unmarshal_complex(data, type)
|
747
747
|
begin
|
748
748
|
value = unmarshal_json(JSON.parse(data), type)
|
@@ -754,20 +754,15 @@ module SpeakeasyClientSDK
|
|
754
754
|
|
755
755
|
sig { params(data: Object, type: Object).returns(Object) }
|
756
756
|
def self.unmarshal_json(data, type)
|
757
|
+
if T.simplifiable? type
|
758
|
+
type = T.simplify_type type
|
759
|
+
end
|
757
760
|
if type.respond_to? :unmarshal_json
|
758
761
|
type.unmarshal_json(data)
|
759
|
-
elsif
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
data.map { |v| Utils.unmarshal_complex(v, type.type) }
|
764
|
-
end
|
765
|
-
elsif type.to_s.start_with? 'T::Hash'
|
766
|
-
if type.type.types[1].respond_to? :raw_type
|
767
|
-
data.transform_values { |v| Utils.unmarshal_complex(v, type.type.types[1].raw_type) }
|
768
|
-
else
|
769
|
-
data.transform_values { |v| Utils.unmarshal_complex(v, type.type.types[1]) }
|
770
|
-
end
|
762
|
+
elsif T.arr? type
|
763
|
+
data.map { |v| Utils.unmarshal_complex(v, T.arr_of(type)) }
|
764
|
+
elsif T.hash? type
|
765
|
+
data.transform_values { |v| Utils.unmarshal_complex(v, T.hash_of(type)) }
|
771
766
|
else
|
772
767
|
data
|
773
768
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: speakeasy_client_sdk_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Speakeasy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -250,6 +250,7 @@ files:
|
|
250
250
|
- lib/speakeasy_client_sdk/sdk.rb
|
251
251
|
- lib/speakeasy_client_sdk/sdkconfiguration.rb
|
252
252
|
- lib/speakeasy_client_sdk/utils/metadata_fields.rb
|
253
|
+
- lib/speakeasy_client_sdk/utils/t.rb
|
253
254
|
- lib/speakeasy_client_sdk/utils/utils.rb
|
254
255
|
- lib/speakeasy_client_sdk_ruby.rb
|
255
256
|
homepage: https://github.com/speakeasy-api/speakeasy-client-sdk-ruby.git
|