Skip to content

Commit

Permalink
Update OpenAPI Specification (#5)
Browse files Browse the repository at this point in the history
* Update OpenAPI Specification (composio.json)

* Regenerate SDKs

---------

Co-authored-by: konfig-bot[bot] <121480725+konfig-bot[bot]@users.noreply.github.com>
Co-authored-by: konfig-publisher <[email protected]>
  • Loading branch information
konfig-bot[bot] and konfig-publisher authored Sep 4, 2024
1 parent bcaac32 commit c8dd3db
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .konfig/changesets/ten-wolves-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
ruby: patch
---

Regenerate SDKs
2 changes: 2 additions & 0 deletions .konfig/progress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ securityParameters:
query: false
filterImportantActions:
query: false
includeLocal:
query: false
integrationId:
query: false
integrationIds:
Expand Down
4 changes: 2 additions & 2 deletions STATISTICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

| SDK Name | Lines of Code |
| -------- | ------------- |
| ruby | 45913 |
| **Total** | 45913 |
| ruby | 45939 |
| **Total** | 45939 |
12 changes: 12 additions & 0 deletions composio.json
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@
"category": {
"type": "string",
"description": "Category of the app"
},
"includeLocal": {
"type": "string",
"description": "Whether to include local tools or not"
}
},
"type": "object"
Expand Down Expand Up @@ -2917,6 +2921,14 @@
"type": "string",
"description": "Category of the app"
}
},
{
"in": "query",
"name": "includeLocal",
"schema": {
"type": "string",
"description": "Whether to include local tools or not"
}
}
],
"responses": {
Expand Down
12 changes: 12 additions & 0 deletions openapi-fixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@
"description": "Category of the app",
"type": "string"
}
},
{
"in": "query",
"name": "includeLocal",
"schema": {
"description": "Whether to include local tools or not",
"type": "string"
}
}
],
"responses": {
Expand Down Expand Up @@ -1983,6 +1991,10 @@
"category": {
"description": "Category of the app",
"type": "string"
},
"includeLocal": {
"description": "Whether to include local tools or not",
"type": "string"
}
},
"type": "object"
Expand Down
2 changes: 1 addition & 1 deletion ruby/.konfig/generate-id.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
92a5d752-6b9e-468b-a77e-48e0dc61ae54
f47f823e-01a5-4a2f-86cd-e4e02f9f4e21
2 changes: 2 additions & 0 deletions ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,15 @@ Retrieve a list of all applications based on query parameters.
```ruby
result = composio.apps.list(
category: "string_example",
include_local: "string_example",
)
p result
```

#### ⚙️ Parameters<a id="⚙️-parameters"></a>

##### category: `String`<a id="category-string"></a>
##### include_local: `String`<a id="include_local-string"></a>
#### 🔄 Return<a id="🔄-return"></a>

[AppListResDTO](./lib/composio/models/app_list_res_dto.rb)
Expand Down
11 changes: 9 additions & 2 deletions ruby/lib/composio/api/apps_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ def get_details_with_http_info(app_name:, extra: {})
# Retrieve a list of all applications based on query parameters.
#
# @param category [String]
# @param include_local [String]
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
def list(category: SENTINEL, extra: {})
def list(category: SENTINEL, include_local: SENTINEL, extra: {})
extra[:category] = category if category != SENTINEL
extra[:include_local] = include_local if include_local != SENTINEL
api_response = list_with_http_info_impl(extra)
api_response.data
end
Expand All @@ -123,16 +125,19 @@ def list(category: SENTINEL, extra: {})
# Retrieve a list of all applications based on query parameters.
#
# @param category [String]
# @param include_local [String]
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
def list_with_http_info(category: SENTINEL, extra: {})
def list_with_http_info(category: SENTINEL, include_local: SENTINEL, extra: {})
extra[:category] = category if category != SENTINEL
extra[:include_local] = include_local if include_local != SENTINEL
list_with_http_info_impl(extra)
end

# Get apps
# Retrieve a list of all applications based on query parameters.
# @param [Hash] opts the optional parameters
# @option opts [String] :category
# @option opts [String] :include_local
# @return [AppListResDTO]
private def list_impl(opts = {})
data, _status_code, _headers = list_with_http_info(opts)
Expand All @@ -143,6 +148,7 @@ def list_with_http_info(category: SENTINEL, extra: {})
# Retrieve a list of all applications based on query parameters.
# @param [Hash] opts the optional parameters
# @option opts [String] :category
# @option opts [String] :include_local
# @return [APIResponse] data is AppListResDTO, status code, headers and response
private def list_with_http_info_impl(opts = {})
if @api_client.config.debugging
Expand All @@ -154,6 +160,7 @@ def list_with_http_info(category: SENTINEL, extra: {})
# query parameters
query_params = opts[:query_params] || {}
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
query_params[:'includeLocal'] = opts[:'include_local'] if !opts[:'include_local'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
18 changes: 14 additions & 4 deletions ruby/lib/composio/models/app_query_dto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ class AppQueryDTO
# Category of the app
attr_accessor :category

# Whether to include local tools or not
attr_accessor :include_local

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'category' => :'category'
:'category' => :'category',
:'include_local' => :'includeLocal'
}
end

Expand All @@ -29,7 +33,8 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.openapi_types
{
:'category' => :'String'
:'category' => :'String',
:'include_local' => :'String'
}
end

Expand Down Expand Up @@ -57,6 +62,10 @@ def initialize(attributes = {})
if attributes.key?(:'category')
self.category = attributes[:'category']
end

if attributes.key?(:'include_local')
self.include_local = attributes[:'include_local']
end
end

# Show invalid properties with the reasons. Usually used together with valid?
Expand All @@ -77,7 +86,8 @@ def valid?
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
category == o.category
category == o.category &&
include_local == o.include_local
end

# @see the `==` method
Expand All @@ -89,7 +99,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[category].hash
[category, include_local].hash
end

# Builds the object from hash
Expand Down
1 change: 1 addition & 0 deletions ruby/spec/api/apps_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
# Retrieve a list of all applications based on query parameters.
# @param [Hash] opts the optional parameters
# @option opts [String] :category
# @option opts [String] :include_local
# @return [AppListResDTO]
describe 'list test' do
it 'should work' do
Expand Down
6 changes: 6 additions & 0 deletions ruby/spec/models/app_query_dto_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@
end
end

describe 'test attribute "include_local"' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
end
end

end

0 comments on commit c8dd3db

Please sign in to comment.