Skip to content
Mike Ralphson edited this page Nov 5, 2020 · 3 revisions

Frequently Asked Questions

How to restore the pre-v2.1.0 behaviour of not expanding the body / requestBody / AsyncAPI headers & payloads

Specify the --noschema option to Widdershins, or set options.schema to false if using the programmatic API.


How to add a schema property such as pattern to the output tables

Specify the --user_templates option, and modify the necessary templates using the p.schema object properties:

diff --git a/templates/openapi3/main.dot b/templates/openapi3/main.dot
index 3547fb7..241aed5 100644
--- a/templates/openapi3/main.dot
+++ b/templates/openapi3/main.dot
@@ -104,8 +104,8 @@ Base URLs:
 {{?}}
 
 {{? block.rows.length}}|Name|Type|Required|Restrictions|Description|
-|---|---|---|---|---|{{?}}
-{{~ block.rows :p}}|{{=p.displayName}}|{{=p.safeType}}|{{=p.required}}|{{=p.restrictions||'none'}}|{{=p.description||'none'}}|
+|---|---|---|---|---|---|{{?}}
+{{~ block.rows :p}}|{{=p.displayName}}|{{=p.safeType}}|{{=p.required}}|{{=p.restrictions||'none'}}|{{=p.description||'none'}}|{{=p.schema.pattern||'no pattern'}}
 {{~}}
 {{~}}
 {{? (blocks[0].rows.length === 0) && (blocks.length === 1) }}

Clone this wiki locally