Skip to content

Commit

Permalink
chore: refreshes getting started ts client
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Aug 14, 2024
1 parent 791ab9b commit 26e8e21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion get-started/quickstart/typescript/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"descriptionHash": "37FE8D63AB108F248AAA5632A5D37D625F8B9E3A6C439952B4029B0AF49579F337028FE07768B89D6F9210460D77E116F312CB505A43E8EB877131E772464F3B",
"descriptionLocation": "../../posts-api.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.17.0",
"kiotaVersion": "1.18.0",
"clientClassName": "PostsClient",
"clientNamespaceName": "ApiSdk",
"language": "TypeScript",
Expand Down
24 changes: 13 additions & 11 deletions get-started/quickstart/typescript/client/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function createPostFromDiscriminatorValue(parseNode: ParseNode | undefine
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPost(post: Partial<Post> | undefined = {}) : Record<string, (node: ParseNode) => void> {
export function deserializeIntoPost(post: Partial<Post> | undefined | null = {}) : Record<string, (node: ParseNode) => void> {
return {
"body": n => { post.body = n.getStringValue(); },
"id": n => { post.id = n.getNumberValue(); },
Expand All @@ -34,31 +34,33 @@ export interface Post extends AdditionalDataHolder, Parsable {
/**
* The body property
*/
body?: string;
body?: string | null;
/**
* The id property
*/
id?: number;
id?: number | null;
/**
* The title property
*/
title?: string;
title?: string | null;
/**
* The userId property
*/
userId?: number;
userId?: number | null;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePost(writer: SerializationWriter, post: Partial<Post> | undefined = {}) : void {
writer.writeStringValue("body", post.body);
writer.writeNumberValue("id", post.id);
writer.writeStringValue("title", post.title);
writer.writeNumberValue("userId", post.userId);
writer.writeAdditionalData(post.additionalData);
export function serializePost(writer: SerializationWriter, post: Partial<Post> | undefined | null = {}) : void {
if (post) {
writer.writeStringValue("body", post.body);
writer.writeNumberValue("id", post.id);
writer.writeStringValue("title", post.title);
writer.writeNumberValue("userId", post.userId);
writer.writeAdditionalData(post.additionalData);
}
}
/* tslint:enable */
/* eslint-enable */

0 comments on commit 26e8e21

Please sign in to comment.