Conversation
roznawsk
approved these changes
Apr 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Python client’s MoQ token generation to match the newer /moq/token API that accepts a JSON configuration (publish/subscribe paths) instead of separate publisher/subscriber endpoints.
Changes:
- Replaces publisher/subscriber token helpers with a single
create_moq_token(publish_path=..., subscribe_path=...)API. - Updates the generated OpenAPI client to POST
/moq/tokenwith an optionalMoqTokenConfigJSON body (and adds the new model). - Updates room API tests to cover publish/subscribe/both cases via the unified method.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_room_api.py | Replaces publisher/subscriber tests with unified MoQ token tests (publish/subscribe/both + no-params + unauthorized). |
| fishjam/api/_fishjam_client.py | Adds create_moq_token and switches client to call the new OpenAPI endpoint with MoqTokenConfig. |
| fishjam/_openapi_client/models/moq_token_config.py | Introduces the request-body model used by /moq/token. |
| fishjam/_openapi_client/models/init.py | Exports MoqTokenConfig from the generated models package. |
| fishjam/_openapi_client/api/moq/create_moq_token.py | Updates the generated endpoint implementation to POST /moq/token with an optional JSON body and parse 400 responses. |
| fishjam/_openapi_client/api/moq/create_moq_subscriber_token.py | Removes the obsolete subscriber-token endpoint implementation. |
Comments suppressed due to low confidence (1)
fishjam/_openapi_client/api/moq/create_moq_token.py:83
- The docstring for this endpoint still says "for the given stream", but the request no longer takes a
stream_idpath parameter and instead uses aMoqTokenConfigbody with publish/subscribe paths. Updating the docstring to reflect the new API shape would avoid confusing generated-client users.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
https://github.com/fishjam-cloud/fishjam/pull/281
Documentation impact
Types of changes
not work as expected)