Skip to content

Commit

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

* fix tsconfig template

* fix potentially undefined Verb `content` and `attributes`

* don't use ??

---------

Co-authored-by: DX-Bandwidth <[email protected]>
Co-authored-by: ckoegel <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2024
1 parent 82c2ab5 commit 9626bb9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,6 @@ components:
- from
- text
- media
- priority
messageDeliveredCallback:
description: Message Delivered Callback
type: object
Expand Down Expand Up @@ -2035,7 +2034,6 @@ components:
- from
- text
- tag
- priority
callbackMethodEnum:
type: string
nullable: true
Expand Down
3 changes: 1 addition & 2 deletions custom_templates/tsconfig.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
"dist",
"tests",
"node_modules"
],
"include": ["global.d.ts"]
]
}
9 changes: 5 additions & 4 deletions models/bxml/Verb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { XMLBuilder, XMLWriterOptions } from 'xmlbuilder2/lib/interfaces';
*/
export class Verb {
name: string;
content: string;
attributes: object;
content: string | undefined;
attributes: object | undefined;

/**
* Creates an instance of Verb
Expand All @@ -19,15 +19,16 @@ export class Verb {
*/
constructor(name: string, content?: string, attributes?: object) {
this.name = name;
this.attributes = attributes;
this.content = content;
this.attributes = attributes;
}

/**
* Generate an XML element for the verb
*/
generateXml(): XMLBuilder {
const xml = create().ele(this.name, this.attributes).txt(this.content);
const xml = create().ele(this.name, this.attributes);
if (this.content) { xml.txt(this.content); }
return xml;
}

Expand Down
2 changes: 1 addition & 1 deletion models/message-failed-callback-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface MessageFailedCallbackMessage {
* @type {PriorityEnum}
* @memberof MessageFailedCallbackMessage
*/
'priority': PriorityEnum;
'priority'?: PriorityEnum;
}


Expand Down
2 changes: 1 addition & 1 deletion models/message-sending-callback-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface MessageSendingCallbackMessage {
* @type {PriorityEnum}
* @memberof MessageSendingCallbackMessage
*/
'priority': PriorityEnum;
'priority'?: PriorityEnum;
}


Expand Down

0 comments on commit 9626bb9

Please sign in to comment.