swagger-api / swagger-api/swagger-ui

OpenAPI 3.0: no validation for request body parameters in try it out

Open
#9,673 3 comments 1 reaction 1 assignee View on GitHub

@glowcloud is already working on this.

Since Mar 8, 2024.

cat: try-it-out specification: 3.x type: bug
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Describe the bug you're encountering

Swagger UI does not show validation errors on try it out for object parameters in OpenAPI 3.0 specifications.

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://petstore3.swagger.io/
  2. Navigate to /store/order POST request
  3. Click on try it out button
  4. Change id to test
  5. Click on execute button
  6. See no errors
Screenshot 2024-03-07 at 14 50 36
Expected behavior

Swagger UI should validate incorrect input and show validation errors to the user. The errors will show for 2.0 specifications and for primitive parameters in 3.0:

Screenshot 2024-03-07 at 14 48 53

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.