Skip to content

Commit 777c42f

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-11518 Update SDK Based on Recent Spec Changes (#195)
* Generate SDK with OpenAPI Generator Version * unit tests --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent b7516e0 commit 777c42f

16 files changed

Lines changed: 458 additions & 16 deletions

.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ docs/RbmWebViewEnum.md
163163
docs/RecordingAvailableCallback.md
164164
docs/RecordingCompleteCallback.md
165165
docs/RecordingStateEnum.md
166+
docs/RecordingTranscriptionClip.md
166167
docs/RecordingTranscriptionMetadata.md
167168
docs/RecordingTranscriptions.md
168169
docs/RecordingsApi.md
@@ -399,6 +400,7 @@ src/Bandwidth.Standard/Model/RbmWebViewEnum.cs
399400
src/Bandwidth.Standard/Model/RecordingAvailableCallback.cs
400401
src/Bandwidth.Standard/Model/RecordingCompleteCallback.cs
401402
src/Bandwidth.Standard/Model/RecordingStateEnum.cs
403+
src/Bandwidth.Standard/Model/RecordingTranscriptionClip.cs
402404
src/Bandwidth.Standard/Model/RecordingTranscriptionMetadata.cs
403405
src/Bandwidth.Standard/Model/RecordingTranscriptions.cs
404406
src/Bandwidth.Standard/Model/RedirectCallback.cs

Bandwidth.Standard.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
33
VisualStudioVersion = 14.0.25420.1
44
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{612BC740-F2E6-4466-87AE-403F47F2323F}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{B644B02A-2DAC-42EA-A361-EB14EAD13209}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Global
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{612BC740-F2E6-4466-87AE-403F47F2323F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{612BC740-F2E6-4466-87AE-403F47F2323F}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{612BC740-F2E6-4466-87AE-403F47F2323F}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{612BC740-F2E6-4466-87AE-403F47F2323F}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{B644B02A-2DAC-42EA-A361-EB14EAD13209}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{B644B02A-2DAC-42EA-A361-EB14EAD13209}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{B644B02A-2DAC-42EA-A361-EB14EAD13209}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{B644B02A-2DAC-42EA-A361-EB14EAD13209}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ Class | Method | HTTP request | Description
326326
- [Model.RecordingAvailableCallback](docs/RecordingAvailableCallback.md)
327327
- [Model.RecordingCompleteCallback](docs/RecordingCompleteCallback.md)
328328
- [Model.RecordingStateEnum](docs/RecordingStateEnum.md)
329+
- [Model.RecordingTranscriptionClip](docs/RecordingTranscriptionClip.md)
329330
- [Model.RecordingTranscriptionMetadata](docs/RecordingTranscriptionMetadata.md)
330331
- [Model.RecordingTranscriptions](docs/RecordingTranscriptions.md)
331332
- [Model.RedirectCallback](docs/RedirectCallback.md)

api/openapi.yaml

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11949,15 +11949,73 @@ components:
1194911949
recordingTranscriptions:
1195011950
example:
1195111951
transcripts:
11952-
- confidence: 0.9
11953-
text: "Nice talking to you, friend!"
11954-
- confidence: 0.9
11955-
text: "Nice talking to you, friend!"
11952+
- speaker: 0
11953+
text: "Hi, is Thursday at two still good for you? Perfect, talk soon."
11954+
confidence: 0.96
11955+
- speaker: 1
11956+
text: "Yes, that works great. See you then! Sounds good, bye!"
11957+
confidence: 0.97
11958+
clips:
11959+
- speaker: 0
11960+
text: "Hi, is Thursday at two still good for you?"
11961+
confidence: 0.97
11962+
startTimeSeconds: 0.4
11963+
endTimeSeconds: 3.1
11964+
- speaker: 1
11965+
text: "Yes, that works great. See you then!"
11966+
confidence: 0.95
11967+
startTimeSeconds: 3.8
11968+
endTimeSeconds: 6.2
11969+
- speaker: 0
11970+
text: "Perfect, talk soon."
11971+
confidence: 0.94
11972+
startTimeSeconds: 6.9
11973+
endTimeSeconds: 8.1
11974+
- speaker: 1
11975+
text: "Sounds good, bye!"
11976+
confidence: 0.98
11977+
startTimeSeconds: 8.5
11978+
endTimeSeconds: 9.7
1195611979
properties:
1195711980
transcripts:
1195811981
items:
1195911982
$ref: '#/components/schemas/transcription'
1196011983
type: array
11984+
clips:
11985+
description: "A list of individual speech clips with speaker, timing, and\
11986+
\ confidence information."
11987+
items:
11988+
$ref: '#/components/schemas/recordingTranscriptionClip'
11989+
type: array
11990+
type: object
11991+
recordingTranscriptionClip:
11992+
properties:
11993+
speaker:
11994+
description: Zero-based index identifying the speaker.
11995+
example: 0
11996+
type: integer
11997+
text:
11998+
description: The transcribed text of this clip.
11999+
example: "Hi there, thanks for calling!"
12000+
type: string
12001+
confidence:
12002+
description: How confident the transcription engine was in transcribing
12003+
this clip (from `0.0` to `1.0`).
12004+
example: 0.85
12005+
format: double
12006+
maximum: 1
12007+
minimum: 0
12008+
type: number
12009+
startTimeSeconds:
12010+
description: "The start time of this clip within the recording, in seconds."
12011+
example: 2.3
12012+
format: double
12013+
type: number
12014+
endTimeSeconds:
12015+
description: "The end time of this clip within the recording, in seconds."
12016+
example: 3.1
12017+
format: double
12018+
type: number
1196112019
type: object
1196212020
callTranscriptionMetadataList:
1196312021
example:
@@ -14048,10 +14106,11 @@ components:
1404814106
type: string
1404914107
type: object
1405014108
transcription:
14051-
example:
14052-
confidence: 0.9
14053-
text: "Nice talking to you, friend!"
1405414109
properties:
14110+
speaker:
14111+
description: Zero-based index identifying the speaker.
14112+
example: 0
14113+
type: integer
1405514114
text:
1405614115
description: The transcribed text
1405714116
example: "Nice talking to you, friend!"

bandwidth.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4354,6 +4354,72 @@ components:
43544354
type: array
43554355
items:
43564356
$ref: '#/components/schemas/transcription'
4357+
clips:
4358+
type: array
4359+
description: >-
4360+
A list of individual speech clips with speaker, timing, and
4361+
confidence information.
4362+
items:
4363+
$ref: '#/components/schemas/recordingTranscriptionClip'
4364+
example:
4365+
transcripts:
4366+
- speaker: 0
4367+
text: Hi, is Thursday at two still good for you? Perfect, talk soon.
4368+
confidence: 0.96
4369+
- speaker: 1
4370+
text: Yes, that works great. See you then! Sounds good, bye!
4371+
confidence: 0.97
4372+
clips:
4373+
- speaker: 0
4374+
text: Hi, is Thursday at two still good for you?
4375+
confidence: 0.97
4376+
startTimeSeconds: 0.4
4377+
endTimeSeconds: 3.1
4378+
- speaker: 1
4379+
text: Yes, that works great. See you then!
4380+
confidence: 0.95
4381+
startTimeSeconds: 3.8
4382+
endTimeSeconds: 6.2
4383+
- speaker: 0
4384+
text: Perfect, talk soon.
4385+
confidence: 0.94
4386+
startTimeSeconds: 6.9
4387+
endTimeSeconds: 8.1
4388+
- speaker: 1
4389+
text: Sounds good, bye!
4390+
confidence: 0.98
4391+
startTimeSeconds: 8.5
4392+
endTimeSeconds: 9.7
4393+
recordingTranscriptionClip:
4394+
type: object
4395+
properties:
4396+
speaker:
4397+
type: integer
4398+
description: Zero-based index identifying the speaker.
4399+
example: 0
4400+
text:
4401+
type: string
4402+
description: The transcribed text of this clip.
4403+
example: Hi there, thanks for calling!
4404+
confidence:
4405+
type: number
4406+
format: double
4407+
minimum: 0
4408+
maximum: 1
4409+
description: >-
4410+
How confident the transcription engine was in transcribing this clip
4411+
(from `0.0` to `1.0`).
4412+
example: 0.85
4413+
startTimeSeconds:
4414+
type: number
4415+
format: double
4416+
description: The start time of this clip within the recording, in seconds.
4417+
example: 2.3
4418+
endTimeSeconds:
4419+
type: number
4420+
format: double
4421+
description: The end time of this clip within the recording, in seconds.
4422+
example: 3.1
43574423
callTranscriptionMetadataList:
43584424
type: array
43594425
items:
@@ -5480,6 +5546,10 @@ components:
54805546
transcription:
54815547
type: object
54825548
properties:
5549+
speaker:
5550+
type: integer
5551+
description: Zero-based index identifying the speaker.
5552+
example: 0
54835553
text:
54845554
type: string
54855555
description: The transcribed text

docs/RecordingTranscriptionClip.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Bandwidth.Standard.Model.RecordingTranscriptionClip
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**Speaker** | **int** | Zero-based index identifying the speaker. | [optional]
8+
**Text** | **string** | The transcribed text of this clip. | [optional]
9+
**Confidence** | **double** | How confident the transcription engine was in transcribing this clip (from &#x60;0.0&#x60; to &#x60;1.0&#x60;). | [optional]
10+
**StartTimeSeconds** | **double** | The start time of this clip within the recording, in seconds. | [optional]
11+
**EndTimeSeconds** | **double** | The end time of this clip within the recording, in seconds. | [optional]
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+

docs/RecordingTranscriptions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Transcripts** | [**List&lt;Transcription&gt;**](Transcription.md) | | [optional]
8+
**Clips** | [**List&lt;RecordingTranscriptionClip&gt;**](RecordingTranscriptionClip.md) | A list of individual speech clips with speaker, timing, and confidence information. | [optional]
89

910
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1011

docs/Transcription.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**Speaker** | **int** | Zero-based index identifying the speaker. | [optional]
78
**Text** | **string** | The transcribed text | [optional]
89
**Confidence** | **double** | The confidence on the recognized content, ranging from &#x60;0.0&#x60; to &#x60;1.0&#x60; with &#x60;1.0&#x60; being the highest confidence. | [optional]
910

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
* Bandwidth
3+
*
4+
* Bandwidth's Communication APIs
5+
*
6+
* The version of the OpenAPI document: 1.0.0
7+
* Contact: letstalk@bandwidth.com
8+
* Generated by: https://github.com/openapitools/openapi-generator.git
9+
*/
10+
11+
12+
using Xunit;
13+
14+
using System;
15+
using System.Linq;
16+
using System.IO;
17+
using System.Collections.Generic;
18+
using Bandwidth.Standard.Model;
19+
using Bandwidth.Standard.Client;
20+
using System.Reflection;
21+
using Newtonsoft.Json;
22+
23+
namespace Bandwidth.Standard.Test.Unit.Model
24+
{
25+
/// <summary>
26+
/// Class for testing RecordingTranscriptionClip
27+
/// </summary>
28+
/// <remarks>
29+
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
30+
/// Please update the test case below to test the model.
31+
/// </remarks>
32+
public class RecordingTranscriptionClipTests : IDisposable
33+
{
34+
private RecordingTranscriptionClip instance;
35+
36+
public RecordingTranscriptionClipTests()
37+
{
38+
instance = new RecordingTranscriptionClip(
39+
speaker: 1,
40+
text: "text",
41+
confidence: 0.9,
42+
startTimeSeconds: 0.0,
43+
endTimeSeconds: 1.0
44+
);
45+
}
46+
47+
public void Dispose()
48+
{
49+
// Cleanup when everything is done.
50+
}
51+
52+
/// <summary>
53+
/// Test an instance of RecordingTranscriptionClip
54+
/// </summary>
55+
[Fact]
56+
public void RecordingTranscriptionClipInstanceTest()
57+
{
58+
Assert.IsType<RecordingTranscriptionClip>(instance);
59+
}
60+
61+
/// <summary>
62+
/// Test the property 'Speaker'
63+
/// </summary>
64+
[Fact]
65+
public void SpeakerTest()
66+
{
67+
Assert.IsType<int>(instance.Speaker);
68+
Assert.Equal(1, instance.Speaker);
69+
}
70+
71+
/// <summary>
72+
/// Test the property 'Text'
73+
/// </summary>
74+
[Fact]
75+
public void TextTest()
76+
{
77+
Assert.IsType<string>(instance.Text);
78+
Assert.Equal("text", instance.Text);
79+
}
80+
81+
/// <summary>
82+
/// Test the property 'Confidence'
83+
/// </summary>
84+
[Fact]
85+
public void ConfidenceTest()
86+
{
87+
Assert.IsType<double>(instance.Confidence);
88+
Assert.Equal(0.9, instance.Confidence);
89+
}
90+
91+
/// <summary>
92+
/// Test the property 'StartTimeSeconds'
93+
/// </summary>
94+
[Fact]
95+
public void StartTimeSecondsTest()
96+
{
97+
Assert.IsType<double>(instance.StartTimeSeconds);
98+
Assert.Equal(0.0, instance.StartTimeSeconds);
99+
}
100+
101+
/// <summary>
102+
/// Test the property 'EndTimeSeconds'
103+
/// </summary>
104+
[Fact]
105+
public void EndTimeSecondsTest()
106+
{
107+
Assert.IsType<double>(instance.EndTimeSeconds);
108+
Assert.Equal(1.0, instance.EndTimeSeconds);
109+
}
110+
}
111+
}

src/Bandwidth.Standard.Test/Unit/Model/RecordingTranscriptionsTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,15 @@ public void TranscriptsTest()
6161
instance.Transcripts = new List<Transcription>();
6262
Assert.IsType<List<Transcription>>(instance.Transcripts);
6363
}
64+
65+
/// <summary>
66+
/// Test the property 'Clips'
67+
/// </summary>
68+
[Fact]
69+
public void ClipsTest()
70+
{
71+
instance.Clips = new List<RecordingTranscriptionClip>();
72+
Assert.IsType<List<RecordingTranscriptionClip>>(instance.Clips);
73+
}
6474
}
6575
}

0 commit comments

Comments
 (0)