Kiota 이상한버그, Response Schema가 One of일 경우... 한 가지 schema 밖에 생성하지 않음
This commit is contained in:
1 parent
e5d4ff5866
commit
712dce8391
13 files changed
+412
-453
No files matched your search
@@ -2,44 +2,98 @@
|
||||
/* eslint-disable */
|
||||
// Generated by Microsoft Kiota
|
||||
// @ts-ignore
|
||||
import { createDeleteResponseDtoFromDiscriminatorValue, createPageResponseDtoFromDiscriminatorValue, serializeDeletePageDto, serializeDeleteResponseDto, serializePageResponseDto, serializeUpdatePageDto, type DeletePageDto, type DeleteResponseDto, type PageResponseDto, type UpdatePageDto } from '../../../models/index.js';
|
||||
import { createDeleteResponseDtoFromDiscriminatorValue, createPageResponseDtoFromDiscriminatorValue, serializePageResponseDto, type DeleteResponseDto, type PageResponseDto } from '../../../models/index.js';
|
||||
// @ts-ignore
|
||||
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
||||
import { type AdditionalDataHolder, type BaseRequestBuilder, type Guid, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';
|
||||
|
||||
/**
|
||||
* Creates a new instance of the appropriate class based on discriminator value
|
||||
* @param parseNode The parse node to use to read the discriminator value and create the object
|
||||
* @returns {WithPagePutRequestBody}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function createWithPagePutRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
|
||||
return deserializeIntoWithPagePutRequestBody;
|
||||
}
|
||||
/**
|
||||
* The deserialization information for the current model
|
||||
* @param WithPagePutRequestBody The instance to deserialize into.
|
||||
* @returns {Record<string, (node: ParseNode) => void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function deserializeIntoWithPagePutRequestBody(withPagePutRequestBody: Partial<WithPagePutRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
|
||||
return {
|
||||
"content": n => { withPagePutRequestBody.content = n.getStringValue(); },
|
||||
"parentPageId": n => { withPagePutRequestBody.parentPageId = n.getGuidValue(); },
|
||||
"sortOrder": n => { withPagePutRequestBody.sortOrder = n.getNumberValue(); },
|
||||
"title": n => { withPagePutRequestBody.title = n.getStringValue(); },
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Serializes information the current object
|
||||
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
||||
* @param WithPagePutRequestBody The instance to serialize from.
|
||||
* @param writer Serialization writer to use to serialize this model
|
||||
*/
|
||||
// @ts-ignore
|
||||
export function serializeWithPagePutRequestBody(writer: SerializationWriter, withPagePutRequestBody: Partial<WithPagePutRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
|
||||
if (!withPagePutRequestBody || isSerializingDerivedType) { return; }
|
||||
writer.writeStringValue("content", withPagePutRequestBody.content);
|
||||
writer.writeGuidValue("parentPageId", withPagePutRequestBody.parentPageId);
|
||||
writer.writeNumberValue("sortOrder", withPagePutRequestBody.sortOrder);
|
||||
writer.writeStringValue("title", withPagePutRequestBody.title);
|
||||
writer.writeAdditionalData(withPagePutRequestBody.additionalData);
|
||||
}
|
||||
/**
|
||||
* Builds and executes requests for operations under /v1/page/{pageId}
|
||||
*/
|
||||
export interface WithPageItemRequestBuilder extends BaseRequestBuilder<WithPageItemRequestBuilder> {
|
||||
/**
|
||||
* 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정).
|
||||
* @param body The request body
|
||||
* 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). (인증 필요)
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<DeleteResponseDto>}
|
||||
* @throws {DeleteResponseDto} error when the service returns a 4XX or 5XX status code
|
||||
*/
|
||||
delete(body: DeletePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteResponseDto | undefined>;
|
||||
delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DeleteResponseDto | undefined>;
|
||||
/**
|
||||
* 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다.
|
||||
* 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. (인증 필요)
|
||||
* @param body The request body
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {Promise<PageResponseDto>}
|
||||
* @throws {PageResponseDto} error when the service returns a 4XX or 5XX status code
|
||||
*/
|
||||
put(body: UpdatePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<PageResponseDto | undefined>;
|
||||
put(body: WithPagePutRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<PageResponseDto | undefined>;
|
||||
/**
|
||||
* 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정).
|
||||
* 페이지를 소프트 삭제합니다 (isDeleted 플래그를 true로 설정). (인증 필요)
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
/**
|
||||
* 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다. (인증 필요)
|
||||
* @param body The request body
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
*/
|
||||
toDeleteRequestInformation(body: DeletePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
toPutRequestInformation(body: WithPagePutRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
}
|
||||
export interface WithPagePutRequestBody extends AdditionalDataHolder, Parsable {
|
||||
/**
|
||||
* 페이지의 제목, 내용, 부모 페이지, 정렬 순서 등을 업데이트합니다.
|
||||
* @param body The request body
|
||||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
||||
* @returns {RequestInformation}
|
||||
* 페이지 내용 (Markdown)
|
||||
*/
|
||||
toPutRequestInformation(body: UpdatePageDto, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
|
||||
content?: string | null;
|
||||
/**
|
||||
* 부모 페이지 ID (null로 설정하면 루트 페이지가 됨)
|
||||
*/
|
||||
parentPageId?: Guid | null;
|
||||
/**
|
||||
* 정렬 순서
|
||||
*/
|
||||
sortOrder?: number | null;
|
||||
/**
|
||||
* 페이지 제목
|
||||
*/
|
||||
title?: string | null;
|
||||
}
|
||||
/**
|
||||
* Uri template for the request builder.
|
||||
@@ -57,9 +111,6 @@ export const WithPageItemRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
},
|
||||
adapterMethodName: "send",
|
||||
responseBodyFactory: createDeleteResponseDtoFromDiscriminatorValue,
|
||||
requestBodyContentType: "application/json",
|
||||
requestBodySerializer: serializeDeletePageDto,
|
||||
requestInformationContentSetMethod: "setContentFromParsable",
|
||||
},
|
||||
put: {
|
||||
uriTemplate: WithPageItemRequestBuilderUriTemplate,
|
||||
@@ -70,7 +121,7 @@ export const WithPageItemRequestBuilderRequestsMetadata: RequestsMetadata = {
|
||||
adapterMethodName: "send",
|
||||
responseBodyFactory: createPageResponseDtoFromDiscriminatorValue,
|
||||
requestBodyContentType: "application/json",
|
||||
requestBodySerializer: serializeUpdatePageDto,
|
||||
requestBodySerializer: serializeWithPagePutRequestBody,
|
||||
requestInformationContentSetMethod: "setContentFromParsable",
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user