Authress-Engineering / openapi-explorer

OpenAPI Web component to generate a UI from the spec.
Apache License 2.0
316 stars 42 forks source link

Parameter Constraint line is only rendered under conditions #190

Closed Xarno closed 1 year ago

Xarno commented 1 year ago

The constraint line for path/query parameters is only rendered when „default“, „s“, „allowedValues“ or „pattern“ is set. (What is s?)

I have a query parameter which is in the open api.json like this. The utils function unpacks the constraint correctly. But the render condition is not true.

      {
          "name" : "lang",
          "in" : "query",
          "description" : "Two Letter Iso lang code. Lowercase",
          "schema" : {
            "maxLength" : 2,
            "minLength" : 2,
            "type" : "string"
          }
        } 

Source reference: https://github.com/Rhosys/openapi-explorer/blob/599858df91c9e3c816426eec2290769e74a44ba1/src/components/api-request.js#L223-L227

wparad commented 1 year ago

Fixed, this will be available in the latest version as soon as the build completes.