-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: no response content type found for deserialization #1485
Comments
Hi @tonven What version of kiota has your client been generated with? What was the last version of the package to work? |
@baywet Thank you for response! |
Thank you for the additional information. Can you please, provide the snippet for the call you're making? as well as the API description. Also, I'm a little confused, in your initial post you mentioned typescript version, and now a dotnet version? |
@baywet Sorry for missunderstanding. I am using .NET project to generate typescript classes for my backend. To be more concrete, I am using FastEndpoints library, which runs kiota generator. Here is the source code from the library that is used: static async Task GenerateClient(IHost app, ClientGenConfig c, CancellationToken ct)
{
if (string.IsNullOrEmpty(c.SwaggerDocumentName))
throw new InvalidOperationException("A Swagger document name is required for Api Client generation!");
var logger = app.Services.GetRequiredService<ILogger<ClientGenerator>>();
logger.LogInformation("Starting [{lang}] Api Client generation for [{doc}]", c.Language.ToString(), c.SwaggerDocumentName);
var swaggerJsonPath = c.CleanOutput
? Path.Combine(Path.GetTempPath(), TempFolder)
: c.OutputPath;
c.OpenAPIFilePath = await ExportSwaggerJson(app, c.SwaggerDocumentName, swaggerJsonPath, null, ct);
await new KiotaBuilder(
logger: LoggerFactory.Create(_ => { }).CreateLogger<KiotaBuilder>(),
config: c,
client: new())
.GenerateClientAsync(ct);
logger.LogInformation("Api Client generation successful!");
if (c.CreateZipArchive)
{
logger.LogInformation("Zipping up the generated client files...");
c.ZipOutputFile ??= Path.Combine(c.OutputPath, $"..{Path.DirectorySeparatorChar}", $"{c.ClientClassName}.zip");
if (File.Exists(c.ZipOutputFile))
File.Delete(c.ZipOutputFile);
ZipFile.CreateFromDirectory(c.OutputPath, c.ZipOutputFile, CompressionLevel.SmallestSize, false, Encoding.UTF8);
logger.LogInformation("Client archive creation successful!");
}
} Here is the response from calling this endpoint: Here is the api endpoint description: "/api/register": {
"post": {
"tags": [
"Api"
],
"operationId": "ApiEndpointsUserManagementRegisterInternalUserRegisterEndpoint",
"requestBody": {
"x-name": "RegistrationRequest",
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiEndpointsUserManagementRegisterInternalUserRegistrationRequest"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {}
},
"application/json": {
"schema": {}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/FastEndpointsErrorResponse"
}
}
}
}
}
}
} |
Thank you for the additional information. Oh wow, you've effectively build a client generation service 😮 Have you tried to generate the same client from the CLI instead and see if you're getting any difference? (in case there are differences in the setup of the builder) Also, in your initial post you describe receiving a 204, but in the screenshot you're getting a 200. Can you double check and confirm which status code the client is receiving please? |
I am getting 200, i mixed up with another endpoint :) |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
Hi. After calling POST endpoint which returns
204 No Content
without response, I am gettingError: no response content type found for deserialization
.I am using 1.0.0-preview.75 versions of typescript library.
Thanks.
The text was updated successfully, but these errors were encountered: