Closed
Description
openedon Jan 17, 2024
kiota --version
1.10.1+fa5da75b8b4f362d821032021bc5bfcf063cb522
openapi yaml like:
openapi: '3.0.2'
info:
title: JSONPlaceholder
version: '1.0'
servers:
- url: https://jsonplaceholder.typicode.com/
paths:
/api/download/{blobId}:
parameters:
- in: path
name: blobId
schema:
type: string
required: true
description: BLOB ID
get:
summary: download temporary BLOB
responses:
'302':
description: Found the BLOB and returned a signed URL to download it.
headers:
Location:
required: true
schema:
type: string
'400':
description: Invalid ID
'403':
description: Not allowed
'404':
description: not found.
default:
description: General Error
content:
application/json:
schema:
type: string
the generated code is using createStringFromDiscriminatorValue
which is not imported and not found in the item/index.ts
public get(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ArrayBuffer | undefined> {
const requestInfo = this.toGetRequestInformation(
requestConfiguration
);
const errorMapping = {
"4XX": createStringFromDiscriminatorValue,
"5XX": createStringFromDiscriminatorValue,
} as Record<string, ParsableFactory<Parsable>>;
return this.requestAdapter.sendPrimitiveAsync<ArrayBuffer>(requestInfo, "ArrayBuffer", errorMapping);
}
I guess the correct one is createMessageFromDiscriminatorValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Type
Projects
Status
Done ✔️