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

API Definition/Implementation Discrepancy with Path MaxReaders Property #2331

Closed
1 of 13 tasks
Tim-Rasmussen opened this issue Sep 11, 2023 · 2 comments · Fixed by #2354
Closed
1 of 13 tasks

API Definition/Implementation Discrepancy with Path MaxReaders Property #2331

Tim-Rasmussen opened this issue Sep 11, 2023 · 2 comments · Fixed by #2354

Comments

@Tim-Rasmussen
Copy link

Which version are you using?

v1.0.0

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

An API call to add or edit a path fails with HTTP status code 400 - bad request. The JSON included in the HTTP POST API call was based on the MediatMTX OpenAPI JSON definition (version 1.0.0). When the posted JSON is amended so that the path maxReaders property is set to 0 instead of 0.0, the API call succeeds. It looks like the OpenAPI JSON definition should define maxReaders as an integer instead of a number.

Describe how to replicate the issue

  1. Start the server.
  2. Add or edit a path using the OpenAPI interface. This was done using a C# proxy generated in Visual Studio from the downloaded OpenAPI definition JSON file (version 1.0.0) but can be replicated using Postman with the path maxReaders property set to 0.0.
  3. The API returns 400 - Bad Request.
  4. Perform step 2 again but set the path maxReaders property to 0.
  5. The API returns 200 - OK.

Did you attach the server logs?

No.

Did you attach a network dump?

No.

@aler9
Copy link
Member

aler9 commented Sep 16, 2023

fixed in v1.1.0

Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants