Skip to content

Update MoQ token request#76

Merged
Karolk99 merged 1 commit intomainfrom
fce-3248/refactor-moq-token
Apr 29, 2026
Merged

Update MoQ token request#76
Karolk99 merged 1 commit intomainfrom
fce-3248/refactor-moq-token

Conversation

@Karolk99
Copy link
Copy Markdown
Collaborator

Description

https://github.com/fishjam-cloud/fishjam/pull/281

Documentation impact

  • Documentation update required
  • Documentation updated in another PR
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

@linear
Copy link
Copy Markdown

linear Bot commented Apr 28, 2026

Copy link
Copy Markdown
Member

@roznawsk roznawsk left a comment

Choose a reason for hiding this comment

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

Make CI tests pass after releasing updated fishjam to staging, before merging this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/token with an optional MoqTokenConfig JSON 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_id path parameter and instead uses a MoqTokenConfig body 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.

Comment thread fishjam/api/_fishjam_client.py
Comment thread fishjam/api/_fishjam_client.py
@Karolk99 Karolk99 merged commit 91bbec2 into main Apr 29, 2026
19 of 25 checks passed
@Karolk99 Karolk99 deleted the fce-3248/refactor-moq-token branch April 29, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants