Closed
Description
openedon Feb 21, 2024
Command used:
dotnet kiota generate --openapi ./content-type-openapi.json -o Generated --language CSharp
dotnet kiota --version
1.11.1+86b3a623dc3fb6b55fed6a49519ec837f0fbc02c
With the following openapi spec:
{
"openapi": "3.0.2",
"info": {
"title": "ContentType",
"version": "1.0.0"
},
"paths": {
"/test": {
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/test"
}
},
"application/json; profile=\"CamelCase\"": {
"schema": {
"$ref": "#/components/schemas/test"
}
},
"application/json; profile=\"PascalCase\"": {
"schema": {
"$ref": "#/components/schemas/test"
}
}
}
},
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/test"
}
},
"application/json; profile=\"CamelCase\"": {
"schema": {
"$ref": "#/components/schemas/test"
}
},
"application/json; profile=\"PascalCase\"": {
"schema": {
"$ref": "#/components/schemas/test"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"test": {
"type": "object",
"properties": {
"prop1": {
"type": "integer",
"format": "int32"
}
}
}
}
}
}
The following line is generated:
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile="CamelCase", application/json;profile="PascalCase"");
where it should be:
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
Done ✔️