REST APIs for managing Schema entities
- delete_schema - Delete a particular schema revision for an Api.
- download_schema - Download the latest schema for a particular apiID.
- download_schema_revision - Download a particular schema revision for an Api.
- get_schema - Get information about the latest schema.
- get_schema_diff - Get a diff of two schema revisions for an Api.
- get_schema_revision - Get information about a particular schema revision for an Api.
- get_schemas - Get information about all schemas associated with a particular apiID.
- register_schema - Register a schema.
Delete a particular schema revision for an Api.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::DeleteSchemaRequest.new(
api_id: "<value>",
revision_id: "<value>",
version_id: "<value>",
)
res = s.schemas.delete_schema(req)
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::DeleteSchemaRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::DeleteSchemaResponse)
Download the latest schema for a particular apiID.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::DownloadSchemaRequest.new(
api_id: "<value>",
version_id: "<value>",
)
res = s.schemas.download_schema(req)
if ! res.two_hundred_application_json_schema.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::DownloadSchemaRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaResponse)
Download a particular schema revision for an Api.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionRequest.new(
api_id: "<value>",
revision_id: "<value>",
version_id: "<value>",
)
res = s.schemas.download_schema_revision(req)
if ! res.two_hundred_application_json_schema.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionResponse)
Returns information about the last uploaded schema for a particular API version. This won't include the schema itself, that can be retrieved via the downloadSchema operation.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::GetSchemaRequest.new(
api_id: "<value>",
version_id: "<value>",
)
res = s.schemas.get_schema(req)
if ! res.schema.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::GetSchemaRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaResponse)
Get a diff of two schema revisions for an Api.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::GetSchemaDiffRequest.new(
api_id: "<value>",
base_revision_id: "<value>",
target_revision_id: "<value>",
version_id: "<value>",
)
res = s.schemas.get_schema_diff(req)
if ! res.schema_diff.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::GetSchemaDiffRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaDiffResponse)
Returns information about the last uploaded schema for a particular schema revision. This won't include the schema itself, that can be retrieved via the downloadSchema operation.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::GetSchemaRevisionRequest.new(
api_id: "<value>",
revision_id: "<value>",
version_id: "<value>",
)
res = s.schemas.get_schema_revision(req)
if ! res.schema.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::GetSchemaRevisionRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaRevisionResponse)
Returns information the schemas associated with a particular apiID. This won't include the schemas themselves, they can be retrieved via the downloadSchema operation.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::GetSchemasRequest.new(
api_id: "<value>",
version_id: "<value>",
)
res = s.schemas.get_schemas(req)
if ! res.classes.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::GetSchemasRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::GetSchemasResponse)
Allows uploading a schema for a particular API version. This will be used to populate ApiEndpoints and used as a base for any schema generation if present.
require 'speakeasy_client_sdk_ruby'
s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::SpeakeasyClientSDK::Operations::RegisterSchemaRequest.new(
request_body: ::SpeakeasyClientSDK::Operations::RegisterSchemaRequestBody.new(
file: ::SpeakeasyClientSDK::Operations::RegisterSchemaFile.new(
content: "0xCAFCA03e0e".encode(),
file_name: "your_file_here",
),
),
api_id: "<value>",
version_id: "<value>",
)
res = s.schemas.register_schema(req)
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::SpeakeasyClientSDK::Operations::RegisterSchemaRequest | ✔️ | The request object to use for the request. |
T.nilable(::SpeakeasyClientSDK::Operations::RegisterSchemaResponse)