Generator: HTML Doc: Pattern string is being capitalized

Created on 24 Jul 2019  路  2Comments  路  Source: asyncapi/generator

The must match XXX badge from the schema is being capitalized (text-transform: capitalize)
Example:

schemas:
    Foo:
      type: object
      properties:
        bar:
          type: string
          pattern: "^hello$"

Is being shown as Must Match ^Hello$

In somehow it's related to https://github.com/asyncapi/generator/pull/62/files

bug good first issue

All 2 comments

Interesting. I can't find at first sight why this is happening. Thanks for reporting!

<div class="capitalize text-sm text-teal font-bold">
  string
  <div class="inline-block">
    <span class="bg-purple-dark font-bold no-underline text-white rounded ml-2"
      style="height: 20px;font-size: 11px;padding: 3px;">must match ^\w{4}\d{8}$</span>
  </div>
</div>

the capitalize class has:

text-transform: capitalize;

which breaks the pattern rendering:
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fmvilas picture fmvilas  路  9Comments

ymarillet picture ymarillet  路  9Comments

aravindajju picture aravindajju  路  9Comments

jdall picture jdall  路  5Comments

venth picture venth  路  5Comments