Skip to content

Commit

Permalink
SWI-5544 Update SDK Based on Recent Spec Changes (#141)
Browse files Browse the repository at this point in the history
* Generate SDK with OpenAPI Generator Version 7.6.0

* Clean SDK using Rubocop

* generate with 7.7.0-SNAPSHOT

* SWI-5443 Add Prism Tests (#143)

* switch to 7.7.0

* redo calls tests for prism

* regenerate and update gemfile

* remove webmock

* update unit tests

* update workflows

* update api client tests

* run prism first?

* SWI-5470 Remove Deprecated add_verb methods (#142)

* rake version?

* what is going on

* idfk

* &&

* try to run in subshell

* sleep then run?

* use bash shell

* update deploy wf

---------

Co-authored-by: DX-Bandwidth <[email protected]>
Co-authored-by: ckoegel <[email protected]>
Co-authored-by: Cameron Koegel <[email protected]>
  • Loading branch information
4 people authored Jul 8, 2024
1 parent 15d91f9 commit d185d5f
Show file tree
Hide file tree
Showing 148 changed files with 661 additions and 1,175 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ jobs:

- name: Install Packages and Test
run: |
npm install -g @stoplight/prism-cli
bundle install
rake unit
prism mock ./bandwidth.yml & (sleep 2; rake unit)
shell: bash

- name: Deploy to Rubygems
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ jobs:

- name: Install Packages and Test
run: |
npm install -g @stoplight/prism-cli
bundle install
rake unit
prism mock ./bandwidth.yml & (sleep 2; rake unit)
env:
RUBY_VERSION: ${{ matrix.ruby-version }}
OPERATING_SYSTEM: ${{ matrix.os }}
shell: bash
1 change: 1 addition & 0 deletions .github/workflows/test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
env:
RUBY_VERSION: 3.2
OPERATING_SYSTEM: ubuntu
shell: bash

notify_for_failures:
name: Notify for Failures
Expand Down
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ docs/CallRecordingMetadata.md
docs/CallState.md
docs/CallStateEnum.md
docs/CallTranscription.md
docs/CallTranscriptionDetectedLanguageEnum.md
docs/CallTranscriptionMetadata.md
docs/CallTranscriptionResponse.md
docs/CallTranscriptionTrackEnum.md
docs/CallbackMethodEnum.md
docs/CallsApi.md
docs/CodeRequest.md
Expand Down Expand Up @@ -127,8 +129,10 @@ lib/bandwidth-sdk/models/call_recording_metadata.rb
lib/bandwidth-sdk/models/call_state.rb
lib/bandwidth-sdk/models/call_state_enum.rb
lib/bandwidth-sdk/models/call_transcription.rb
lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb
lib/bandwidth-sdk/models/call_transcription_metadata.rb
lib/bandwidth-sdk/models/call_transcription_response.rb
lib/bandwidth-sdk/models/call_transcription_track_enum.rb
lib/bandwidth-sdk/models/callback_method_enum.rb
lib/bandwidth-sdk/models/code_request.rb
lib/bandwidth-sdk/models/conference.rb
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.6.0
7.7.0
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ source 'https://rubygems.org'
gemspec

group :development, :test do
gem 'rake', '~> 13.0.1'
gem 'rake', '~> 13.2.1'
gem 'pry-byebug'
gem 'rubocop', '~> 1.52.0'
gem 'webmock', '~> 3.18.0'
gem 'simplecov', '~> 0.21.2'
end
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ Class | Method | HTTP request | Description
- [Bandwidth::CallState](docs/CallState.md)
- [Bandwidth::CallStateEnum](docs/CallStateEnum.md)
- [Bandwidth::CallTranscription](docs/CallTranscription.md)
- [Bandwidth::CallTranscriptionDetectedLanguageEnum](docs/CallTranscriptionDetectedLanguageEnum.md)
- [Bandwidth::CallTranscriptionMetadata](docs/CallTranscriptionMetadata.md)
- [Bandwidth::CallTranscriptionResponse](docs/CallTranscriptionResponse.md)
- [Bandwidth::CallTranscriptionTrackEnum](docs/CallTranscriptionTrackEnum.md)
- [Bandwidth::CallbackMethodEnum](docs/CallbackMethodEnum.md)
- [Bandwidth::CodeRequest](docs/CodeRequest.md)
- [Bandwidth::Conference](docs/Conference.md)
Expand Down
2 changes: 1 addition & 1 deletion bandwidth-sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
37 changes: 21 additions & 16 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,21 @@ components:
and will include its result.
example: async
callTranscriptionDetectedLanguageEnum:
type: string
enum:
- en-US
- es-US
- fr-FR
description: The detected language for this transcription.
example: en-US
callTranscriptionTrackEnum:
type: string
enum:
- inbound
- outbound
description: Which `track` this transcription is derived from.
example: inbound
createCall:
type: object
required:
Expand Down Expand Up @@ -3265,7 +3280,7 @@ components:
accountId:
type: string
description: The user account associated with the call.
example: '920012'
example: '9900000'
callId:
type: string
description: The call id associated with the event.
Expand All @@ -3281,27 +3296,16 @@ components:
example:
- detectedLanguage: en-US
track: inbound
text: Hello World! This is an example.
transcript: Hello World! This is an example.
confidence: 0.9
callTranscription:
type: object
properties:
detectedLanguage:
type: string
enum:
- en-US
- es-US
- fr-FR
description: The detected language for this transcription.
example: en-US
$ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum'
track:
type: string
enum:
- inbound
- outbound
description: Which `track` this transcription is derived from.
example: inbound
text:
$ref: '#/components/schemas/callTranscriptionTrackEnum'
transcript:
type: string
description: The transcription itself.
example: Hello World! This is an example.
Expand All @@ -3327,6 +3331,7 @@ components:
$ref: '#/components/schemas/status'
completedTime:
type: string
format: date-time
description: The time that the transcription was completed
example: '2022-06-13T18:46:29.715Z'
url:
Expand Down
3 changes: 1 addition & 2 deletions custom_templates/Gemfile.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ source 'https://rubygems.org'
gemspec

group :development, :test do
gem 'rake', '~> 13.0.1'
gem 'rake', '~> 13.2.1'
gem 'pry-byebug'
gem 'rubocop', '~> 1.52.0'
gem 'webmock', '~> 3.18.0'
gem 'simplecov', '~> 0.21.2'
end
12 changes: 6 additions & 6 deletions docs/CallTranscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **detected_language** | **String** | The detected language for this transcription. | [optional] |
| **track** | **String** | Which &#x60;track&#x60; this transcription is derived from. | [optional] |
| **text** | **String** | The transcription itself. | [optional] |
| **detected_language** | [**CallTranscriptionDetectedLanguageEnum**](CallTranscriptionDetectedLanguageEnum.md) | | [optional] |
| **track** | [**CallTranscriptionTrackEnum**](CallTranscriptionTrackEnum.md) | | [optional] |
| **transcript** | **String** | The transcription itself. | [optional] |
| **confidence** | **Float** | How confident the transcription engine was in transcribing the associated audio (from &#x60;0&#x60; to &#x60;1&#x60;). | [optional] |

## Example
Expand All @@ -15,9 +15,9 @@
require 'bandwidth-sdk'

instance = Bandwidth::CallTranscription.new(
detected_language: en-US,
track: inbound,
text: Hello World! This is an example.,
detected_language: null,
track: null,
transcript: Hello World! This is an example.,
confidence: 0.9
)
```
Expand Down
15 changes: 15 additions & 0 deletions docs/CallTranscriptionDetectedLanguageEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Bandwidth::CallTranscriptionDetectedLanguageEnum

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

## Example

```ruby
require 'bandwidth-sdk'

instance = Bandwidth::CallTranscriptionDetectedLanguageEnum.new()
```

4 changes: 2 additions & 2 deletions docs/CallTranscriptionResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
require 'bandwidth-sdk'

instance = Bandwidth::CallTranscriptionResponse.new(
account_id: 920012,
account_id: 9900000,
call_id: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
transcription_id: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b,
tracks: [{&quot;detectedLanguage&quot;:&quot;en-US&quot;,&quot;track&quot;:&quot;inbound&quot;,&quot;text&quot;:&quot;Hello World! This is an example.&quot;,&quot;confidence&quot;:0.9}]
tracks: [{&quot;detectedLanguage&quot;:&quot;en-US&quot;,&quot;track&quot;:&quot;inbound&quot;,&quot;transcript&quot;:&quot;Hello World! This is an example.&quot;,&quot;confidence&quot;:0.9}]
)
```

15 changes: 15 additions & 0 deletions docs/CallTranscriptionTrackEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Bandwidth::CallTranscriptionTrackEnum

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

## Example

```ruby
require 'bandwidth-sdk'

instance = Bandwidth::CallTranscriptionTrackEnum.new()
```

2 changes: 1 addition & 1 deletion docs/RecordingTranscriptionMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| ---- | ---- | ----------- | ----- |
| **id** | **String** | The unique transcription ID | [optional] |
| **status** | **String** | The current status of the process. For recording, current possible values are &#39;processing&#39;, &#39;partial&#39;, &#39;complete&#39;, &#39;deleted&#39;, and &#39;error&#39;. For transcriptions, current possible values are &#39;none&#39;, &#39;processing&#39;, &#39;available&#39;, &#39;error&#39;, &#39;timeout&#39;, &#39;file-size-too-big&#39;, and &#39;file-size-too-small&#39;. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] |
| **completed_time** | **String** | The time that the transcription was completed | [optional] |
| **completed_time** | **Time** | The time that the transcription was completed | [optional] |
| **url** | **String** | The URL of the [transcription](#operation/getCallTranscription) | [optional] |

## Example
Expand Down
4 changes: 3 additions & 1 deletion lib/bandwidth-sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand All @@ -26,8 +26,10 @@
require 'bandwidth-sdk/models/call_state'
require 'bandwidth-sdk/models/call_state_enum'
require 'bandwidth-sdk/models/call_transcription'
require 'bandwidth-sdk/models/call_transcription_detected_language_enum'
require 'bandwidth-sdk/models/call_transcription_metadata'
require 'bandwidth-sdk/models/call_transcription_response'
require 'bandwidth-sdk/models/call_transcription_track_enum'
require 'bandwidth-sdk/models/callback_method_enum'
require 'bandwidth-sdk/models/code_request'
require 'bandwidth-sdk/models/conference'
Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/calls_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/conferences_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/media_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/messages_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/mfa_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/phone_number_lookup_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/recordings_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/statistics_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/transcriptions_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
Generator version: 7.6.0
Generator version: 7.7.0
=end

Expand Down
Loading

0 comments on commit d185d5f

Please sign in to comment.