Skip to content
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

[http][multipart] missing expected name of HttpPart #3644

Closed
Tracked by #960
msyyc opened this issue Jun 24, 2024 · 2 comments
Closed
Tracked by #960

[http][multipart] missing expected name of HttpPart #3644

msyyc opened this issue Jun 24, 2024 · 2 comments
Assignees

Comments

@msyyc
Copy link
Contributor

msyyc commented Jun 24, 2024

According to #3046:
image
I expect the "name" of this part shall be "image", however, for the similar scenario :

it("extract headers for the part", async () => {
const op = await getHttpOp(`
op read(
@header contentType: "multipart/mixed",
@header operationHeader: string;
@multipartBody body: [
HttpPart<{
@body nested: string,
@header partHeader: string;
}>]): void;
`);
strictEqual(op.parameters.parameters.length, 2);
strictEqual(op.parameters.parameters[0].name, "Content-Type");
strictEqual(op.parameters.parameters[1].name, "operation-header");
const body = op.parameters.body;
strictEqual(body?.bodyKind, "multipart");
strictEqual(body.parts.length, 1);
strictEqual(body.parts[0].headers.length, 1);
strictEqual(body.parts[0].headers[0].options.name, "part-header");
});

current http parse it into "undefined" instead of "nested":
image

@markcowl
Copy link
Contributor

@bterlson please investigate

@timotheeguerin
Copy link
Member

we cut that from the design as it was a bit far fetched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants