Skip to content

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

@lephuongbg

Description

@lephuongbg

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions