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

Test multiBinaryParts must be called twice with different arguments #604

Open
jhendrixMSFT opened this issue Jun 18, 2024 · 2 comments
Open
Assignees
Labels
invalid This doesn't seem right

Comments

@jhendrixMSFT
Copy link
Member

jhendrixMSFT commented Jun 18, 2024

For reference: https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http/payload/multipart/main.tsp#L246-L250

The endpoint must be called twice with different arguments which is confusing and not documented on the operation. In a conversation with @timotheeguerin tests aren't supposed to follow this pattern.

@jhendrixMSFT jhendrixMSFT added the invalid This doesn't seem right label Jun 18, 2024
@jhendrixMSFT jhendrixMSFT changed the title Test multiBinaryParts must be called twice with different payloads Test multiBinaryParts must be called twice with different arguments Jun 18, 2024
@msyyc
Copy link
Member

msyyc commented Jun 25, 2024

picture is optional:

model MultiBinaryPartsRequest {
profileImage: bytes;
picture?: bytes;
}

If you send twice that one has picture and the other has no picture, it definitely proves picture of your generated SDK is optional; if only send once with picture or with no picture, it is not enough to prove generated SDK is right.

@msyyc msyyc closed this as completed Jul 8, 2024
@timotheeguerin timotheeguerin reopened this Jul 8, 2024
@timotheeguerin
Copy link
Member

timotheeguerin commented Jul 8, 2024

Test should NOT be needing ever to be called twice this should be converted to 2 test
This means you are describing 2 feature in one and is terrible for new emitters to write test and understand that as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants