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

OAI 3's minimum/maximum validation doesn't show on UI #5016

Closed
lephuongbg opened this issue Nov 8, 2018 · 0 comments · Fixed by #5901
Closed

OAI 3's minimum/maximum validation doesn't show on UI #5016

lephuongbg opened this issue Nov 8, 2018 · 0 comments · Fixed by #5901

Comments

@lephuongbg
Copy link

lephuongbg commented Nov 8, 2018

Q&A

  • OS: Linux
  • Browser: Chrome
  • Version: 70
  • Method of installation: npm
  • Swagger-UI version: 3.18.3
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Example Swagger/OpenAPI definition:

{
  "openapi": "3.0.0",
  "info": {
    "title": "Test API",
    "version": "1"
  },
  "paths": {
    "/test": {
      "get": {
        "parameters": [
         {
           "in": "query",
            "name": "test",
            "schema": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "required": false
         }
        ],
        "responses": {
          "204": {"description": "success"}
        }
      }
    }
  }
}

Swagger-UI configuration options:

SwaggerUI({
  // default config
})

Describe the bug you're encountering

Minimum/maximum information doesn't show in parameter validation. In "Try it Out", if I put something that out of the range, even though the Execute button stop running, there is no red border on the input to indicate error.

May be related to #4581

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://editor.swagger.io/
  2. Use example definition above
  3. Click "Try it out"
  4. Put 10000 for test
  5. Click Execute

Expected behavior

There should be red border to indicate error on test input.
There should be minimum, maximum validation information in UI. (Like it was for Swagger 2.0)

Screenshots

screenshot_20181109_083230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants