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

add spector test for jsonl #6201

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

add spector test for jsonl #6201

wants to merge 3 commits into from

Conversation

tadelesh
Copy link
Member

No description provided.

@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:http-specs For issues/prs related to the @typespec/http-specs package label Feb 28, 2025
@tadelesh
Copy link
Member Author

when regen doc for spector, i encountered this error. @timotheeguerin is it a problem in spector or in http lib?
image

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 28, 2025

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/spector

The following packages have already been documented:

  • @typespec/http-specs
Show changes

@typespec/http-specs - feature ✏️

Add tests for basic jsonl streaming.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 28, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@tadelesh tadelesh marked this pull request as ready for review March 3, 2025 03:42
Copy link
Contributor

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the "pass" criteria for the test :-)

For the simple version, it would just be binary of such input/output to/from the API?

@tadelesh
Copy link
Member Author

tadelesh commented Mar 3, 2025

What would be the "pass" criteria for the test :-)

For the simple version, it would just be binary of such input/output to/from the API?

i think so. currently, we could only need to support send request or receive response with binary payload.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit for the location.

We currently had a payload folder and response folder. But this test contains both. I would be fine that we add the streaming folder.

headers: {
"Content-Type": "application/jsonl",
},
body: '{"desc": "one"}\n{"desc": "two"}\n{"desc": "three"}',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: '{"desc": "one"}\n{"desc": "two"}\n{"desc": "three"}' appears for 3 times so maybe you could define a constant variable to reuse it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:http-specs For issues/prs related to the @typespec/http-specs package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants