Skip to content

Commit

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

* update workflow files

* move tests

* generate on 7.7.0

* move model unit tests

* move api unit tests

* move bxml tests

* update workflows

* fix failing unit tests

* update model unit tests for transcriptions and recordings

* fix transcription test

---------

Co-authored-by: DX-Bandwidth <dx@bandwidth.com>
Co-authored-by: ckoegel <ckoegel1006@gmail.com>
  • Loading branch information
3 people authored Aug 20, 2024
1 parent 28a1789 commit d1fdd65
Show file tree
Hide file tree
Showing 236 changed files with 693 additions and 8,929 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Test PR
on:
pull_request:
branches:
- main
workflow_dispatch:

env:
Expand All @@ -20,25 +22,26 @@ env:
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}

jobs:
test_pr:
test:
name: Test PR
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-22.04, ubuntu-20.04]
dotnet: [6.0.x, 7.0.x]
dotnet: [6.0.x, 7.0.x, 8.0.x]
fail-fast: false
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}

- name: Run functional tests
- name: Run Tests
env:
OPERATING_SYSTEM: ${{ matrix.os }}
DOTNET_VERSION: ${{ matrix.dotnet }}
run: dotnet test src/Bandwidth.Standard.Test
run: |
dotnet test src/Bandwidth.Standard.Test --filter DisplayName~Bandwidth.Standard.Test.Unit
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Test Main Branch Nightly
name: Smoke Test
on:
schedule:
- cron: "0 4 * * *"
pull_request:
branches:
- main
paths:
- "src/Bandwidth.Standard.Test/Smoke/*"

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
Expand All @@ -20,39 +25,33 @@ env:
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}

jobs:
test_main:
name: Test Main Branch Nightly
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, windows-2019, ubuntu-22.04, ubuntu-20.04]
dotnet: [6.0.x, 7.0.x]
fail-fast: false
test:
name: Smoke Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: "main"
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: 8.0.x

- name: Run functional tests
env:
OPERATING_SYSTEM: ${{ matrix.os }}
DOTNET_VERSION: ${{ matrix.dotnet }}
run: dotnet test src/Bandwidth.Standard.Test
OPERATING_SYSTEM: ubuntu-latest
DOTNET_VERSION: 8.0.x
run: |
dotnet test src/Bandwidth.Standard.Test --filter DisplayName~Bandwidth.Standard.Test.Smoke
notify_for_failures:
name: Notify for failures
needs: [test_main]
needs: [test]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack of failures
uses: Bandwidth/build-notify-slack-action@v1.0.0
uses: Bandwidth/build-notify-slack-action@v2.0.0
with:
job-status: failure
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
2 changes: 0 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ docs/VerifyCodeResponse.md
docs/VoiceApiError.md
docs/VoiceCodeResponse.md
git_push.sh
src/Bandwidth.Standard.Test/Model/CallTranscriptionDetectedLanguageEnumTests.cs
src/Bandwidth.Standard.Test/Model/CallTranscriptionTrackEnumTests.cs
src/Bandwidth.Standard/Api/CallsApi.cs
src/Bandwidth.Standard/Api/ConferencesApi.cs
src/Bandwidth.Standard/Api/MFAApi.cs
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.0
7.7.0
10 changes: 5 additions & 5 deletions Bandwidth.Standard.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{6E2C3915-50F7-4853-B6BA-5191237A5ED8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{38239AD3-E140-4FF8-BC89-D26A9DB3DB28}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6E2C3915-50F7-4853-B6BA-5191237A5ED8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E2C3915-50F7-4853-B6BA-5191237A5ED8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E2C3915-50F7-4853-B6BA-5191237A5ED8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E2C3915-50F7-4853-B6BA-5191237A5ED8}.Release|Any CPU.Build.0 = Release|Any CPU
{38239AD3-E140-4FF8-BC89-D26A9DB3DB28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38239AD3-E140-4FF8-BC89-D26A9DB3DB28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38239AD3-E140-4FF8-BC89-D26A9DB3DB28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38239AD3-E140-4FF8-BC89-D26A9DB3DB28}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap

- API version: 1.0.0
- SDK version: 1.0.0
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
For more information, please visit [https://dev.bandwidth.com](https://dev.bandwidth.com)

Expand Down
58 changes: 54 additions & 4 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5941,6 +5941,10 @@ components:
example: sms
type: string
fieldError:
example:
fieldName: from
description: '''+invalid'' must be replaced with a valid E164 formatted telephone
number'
properties:
fieldName:
description: The name of the field that contains the error
Expand Down Expand Up @@ -5970,7 +5974,7 @@ components:
messageStatus: RECEIVED
receiveTime: 2020-04-07T14:03:07Z
accountId: "9900000"
messageDirection: null
messageDirection: INBOUND
messageType: sms
carrierName: other
recipientCount: 1
Expand All @@ -5987,7 +5991,7 @@ components:
messageStatus: RECEIVED
receiveTime: 2020-04-07T14:03:07Z
accountId: "9900000"
messageDirection: null
messageDirection: INBOUND
messageType: sms
carrierName: other
recipientCount: 1
Expand Down Expand Up @@ -6021,7 +6025,7 @@ components:
messageStatus: RECEIVED
receiveTime: 2020-04-07T14:03:07Z
accountId: "9900000"
messageDirection: null
messageDirection: INBOUND
messageType: sms
carrierName: other
recipientCount: 1
Expand Down Expand Up @@ -6127,6 +6131,9 @@ components:
title: PageInfo
type: object
messagingRequestError:
example:
description: description
type: type
properties:
type:
type: string
Expand All @@ -6138,6 +6145,16 @@ components:
title: MessagingRequestError
type: object
createMessageRequestError:
example:
fieldErrors:
- fieldName: from
description: '''+invalid'' must be replaced with a valid E164 formatted
telephone number'
- fieldName: from
description: '''+invalid'' must be replaced with a valid E164 formatted
telephone number'
description: description
type: type
properties:
type:
type: string
Expand Down Expand Up @@ -6198,7 +6215,7 @@ components:
text: Hello world
tag: custom tag
applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
direction: null
direction: in
properties:
id:
description: The id of the message.
Expand Down Expand Up @@ -7322,6 +7339,7 @@ components:
url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription
status: completed
parentCallId: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d
recordingName: my-recording-name
transferCallerId: "+15555555555"
transferTo: "+15555555555"
duration: PT13.67S
Expand Down Expand Up @@ -7421,6 +7439,10 @@ components:
type: string
transcription:
$ref: '#/components/schemas/recordingTranscriptionMetadata'
recordingName:
description: A name to identify this recording.
example: my-recording-name
type: string
type: object
conference:
example:
Expand Down Expand Up @@ -7632,6 +7654,7 @@ components:
channels: 1
mediaUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media
conferenceId: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
recordingName: my-recording-name
name: my-conference-name
startTime: 2022-06-17T22:19:40.375Z
endTime: 2022-06-17T22:20:00Z
Expand Down Expand Up @@ -7694,6 +7717,10 @@ components:
format: uri
nullable: true
type: string
recordingName:
description: A name to identify this recording.
example: my-recording-name
type: string
type: object
machineDetectionConfiguration:
description: "The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine\
Expand Down Expand Up @@ -7877,6 +7904,7 @@ components:
callTranscriptionMetadataList:
example:
- transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
transcriptionName: live_transcription
transcriptionUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
items:
$ref: '#/components/schemas/callTranscriptionMetadata'
Expand All @@ -7887,6 +7915,11 @@ components:
description: The programmable voice API transcription ID.
example: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
type: string
transcriptionName:
description: The programmable voice API transcription name. This name could
be provided by the user when creating the transcription.
example: live_transcription
type: string
transcriptionUrl:
description: |-
A URL that may be used to retrieve the transcription itself. This points to the
Expand Down Expand Up @@ -7980,6 +8013,10 @@ components:
type: string
type: object
voiceApiError:
example:
description: description
id: id
type: type
properties:
type:
type: string
Expand Down Expand Up @@ -9838,6 +9875,10 @@ components:
description: The call id associated with the event.
example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
type: string
recordingName:
description: A name to identify this recording.
example: my-recording-name
type: string
callUrl:
description: The URL of the call associated with the event.
example: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
Expand Down Expand Up @@ -10067,6 +10108,9 @@ components:
type: boolean
type: object
mfaRequestError:
example:
requestId: 354cc8a3-6701-461e-8fa7-8671703dd898
error: 400 Request is malformed or invalid
properties:
error:
description: A message describing the error with your request.
Expand All @@ -10078,13 +10122,17 @@ components:
type: string
type: object
mfaUnauthorizedRequestError:
example:
message: Unauthorized
properties:
message:
description: Unauthorized
example: Unauthorized
type: string
type: object
mfaForbiddenRequestError:
example:
message: Missing Authentication Token
properties:
message:
description: The message containing the reason behind the request being
Expand Down Expand Up @@ -10227,6 +10275,8 @@ components:
type: string
type: object
tnLookupRequestError:
example:
message: example error message
properties:
message:
description: A description of what validation error occurred.
Expand Down
15 changes: 15 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2802,6 +2802,8 @@ components:
$ref: '#/components/schemas/mediaUrl'
transcription:
$ref: '#/components/schemas/recordingTranscriptionMetadata'
recordingName:
$ref: '#/components/schemas/recordingName'
conference:
type: object
properties:
Expand Down Expand Up @@ -3041,6 +3043,8 @@ components:
$ref: '#/components/schemas/status'
mediaUrl:
$ref: '#/components/schemas/mediaUrl'
recordingName:
$ref: '#/components/schemas/recordingName'
machineDetectionConfiguration:
type: object
description: >-
Expand Down Expand Up @@ -3254,6 +3258,7 @@ components:
$ref: '#/components/schemas/callTranscriptionMetadata'
example:
- transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
transcriptionName: live_transcription
transcriptionUrl: >-
https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
callTranscriptionMetadata:
Expand All @@ -3263,6 +3268,12 @@ components:
type: string
description: The programmable voice API transcription ID.
example: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
transcriptionName:
type: string
description: >-
The programmable voice API transcription name. This name could be
provided by the user when creating the transcription.
example: live_transcription
transcriptionUrl:
type: string
description: >-
Expand Down Expand Up @@ -4259,6 +4270,10 @@ components:
type: string
description: The call id associated with the event.
example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
recordingName:
type: string
description: A name to identify this recording.
example: my-recording-name
callUrl:
type: string
description: The URL of the call associated with the event.
Expand Down
Loading

0 comments on commit d1fdd65

Please sign in to comment.