Class: Conductor::Http::Api::SchemaResourceApi
- Inherits:
-
Object
- Object
- Conductor::Http::Api::SchemaResourceApi
- Defined in:
- lib/conductor/http/api/schema_resource_api.rb
Overview
SchemaResourceApi - API for schema management operations (Orkes)
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_schema_by_name(name) ⇒ void
Delete all versions of a schema by name.
-
#delete_schema_by_name_and_version(name, version) ⇒ void
Delete a schema by name and version.
-
#get_all_schemas ⇒ Array<SchemaDef>
Get all schemas.
-
#get_schema_by_name_and_version(name, version) ⇒ SchemaDef
Get a schema by name and version.
-
#initialize(api_client = nil) ⇒ SchemaResourceApi
constructor
A new instance of SchemaResourceApi.
-
#save(body, new_version: false) ⇒ void
Save a schema definition.
Constructor Details
#initialize(api_client = nil) ⇒ SchemaResourceApi
Returns a new instance of SchemaResourceApi.
12 13 14 |
# File 'lib/conductor/http/api/schema_resource_api.rb', line 12 def initialize(api_client = nil) @api_client = api_client || ApiClient.new end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
10 11 12 |
# File 'lib/conductor/http/api/schema_resource_api.rb', line 10 def api_client @api_client end |
Instance Method Details
#delete_schema_by_name(name) ⇒ void
This method returns an undefined value.
Delete all versions of a schema by name
71 72 73 74 75 76 77 78 |
# File 'lib/conductor/http/api/schema_resource_api.rb', line 71 def delete_schema_by_name(name) @api_client.call_api( '/schema/{name}', 'DELETE', path_params: { name: name }, return_http_data_only: true ) end |
#delete_schema_by_name_and_version(name, version) ⇒ void
This method returns an undefined value.
Delete a schema by name and version
59 60 61 62 63 64 65 66 |
# File 'lib/conductor/http/api/schema_resource_api.rb', line 59 def delete_schema_by_name_and_version(name, version) @api_client.call_api( '/schema/{name}/{version}', 'DELETE', path_params: { name: name, version: version }, return_http_data_only: true ) end |
#get_all_schemas ⇒ Array<SchemaDef>
Get all schemas
46 47 48 49 50 51 52 53 |
# File 'lib/conductor/http/api/schema_resource_api.rb', line 46 def get_all_schemas @api_client.call_api( '/schema', 'GET', return_type: 'Array<SchemaDef>', return_http_data_only: true ) end |
#get_schema_by_name_and_version(name, version) ⇒ SchemaDef
Get a schema by name and version
34 35 36 37 38 39 40 41 42 |
# File 'lib/conductor/http/api/schema_resource_api.rb', line 34 def get_schema_by_name_and_version(name, version) @api_client.call_api( '/schema/{name}/{version}', 'GET', path_params: { name: name, version: version }, return_type: 'SchemaDef', return_http_data_only: true ) end |
#save(body, new_version: false) ⇒ void
This method returns an undefined value.
Save a schema definition
20 21 22 23 24 25 26 27 28 |
# File 'lib/conductor/http/api/schema_resource_api.rb', line 20 def save(body, new_version: false) @api_client.call_api( '/schema', 'POST', query_params: { newVersion: new_version }, body: body, return_http_data_only: true ) end |