@@ -99,14 +99,13 @@ For anything more complicated, or for generating specs dynamically, you can also
9999
100100#### CLI Options
101101
102- | Option | Alias | Default | Description |
103- | :-------------------- | :---- | :--------------------------: | :---------------------------------------------------------------------------- |
104- | ` --wrapper ` | ` -w ` | ` declare namespace OpenAPI2 ` | How should this export the types? |
105- | ` --output [location] ` | ` -o ` | (stdout) | Where should the output file be saved? |
106- | ` --swagger [version] ` | ` -s ` | ` 2 ` | Manually specify Swagger version (by default it will use ` version ` in schema) |
107- | ` --camelcase ` | ` -c ` | ` false ` | Convert ` snake_case ` properties to ` camelCase ` |
108- | ` --nowarning ` | | ` false ` | Disables “autogenerated file” warning at the top of generated files |
109- | ` --nowrapper ` | ` -nw ` | ` false ` | Disables rendering a wrapper |
102+ | Option | Alias | Default | Description |
103+ | :-------------------- | :---- | :--------------------------: | :------------------------------------------------------------------ |
104+ | ` --wrapper ` | ` -w ` | ` declare namespace OpenAPI2 ` | How should this export the types? |
105+ | ` --output [location] ` | ` -o ` | (stdout) | Where should the output file be saved? |
106+ | ` --camelcase ` | ` -c ` | ` false ` | Convert ` snake_case ` properties to ` camelCase ` |
107+ | ` --nowarning ` | | ` false ` | Disables “autogenerated file” warning at the top of generated files |
108+ | ` --nowrapper ` | ` -nw ` | ` false ` | Disables rendering a wrapper |
110109
111110### Node
112111
@@ -131,20 +130,19 @@ If your specs are in YAML, you’ll have to convert them to JS objects using a l
131130
132131#### Node Options
133132
134- | Name | Type | Default | Description |
135- | :--------------- | :---------------: | :--------------------------: | :--------------------------------------------------------------------------- |
136- | ` wrapper ` | ` string \| false ` | ` declare namespace OpenAPI2 ` | How should this export the types? Pass false to disable rendering a wrapper |
137- | ` swagger ` | ` number ` | ` 2 ` | Manully specify Swagger version (by default it will use ` version ` in schema) |
138- | ` camelcase ` | ` boolean ` | ` false ` | Convert ` snake_case ` properties to ` camelCase ` |
139- | ` propertyMapper ` | ` function ` | ` undefined ` | Allows you to further manipulate how properties are parsed. See below. |
133+ | Name | Type | Default | Description |
134+ | :--------------- | :---------------: | :--------------------------: | :-------------------------------------------------------------------------- |
135+ | ` wrapper ` | ` string \| false ` | ` declare namespace OpenAPI2 ` | How should this export the types? Pass false to disable rendering a wrapper |
136+ | ` camelcase ` | ` boolean ` | ` false ` | Convert ` snake_case ` properties to ` camelCase ` |
137+ | ` propertyMapper ` | ` function ` | ` undefined ` | Allows you to further manipulate how properties are parsed. See below. |
140138
141139#### PropertyMapper
142140
143141In order to allow more control over how properties are parsed, and to specifically handle
144142` x-something ` -properties, the ` propertyMapper ` option may be specified.
145143
146144This is a function that, if specified, is called for each property and allows you to change how
147- swagger-to-ts handles parsing of swagger files.
145+ swagger-to-ts handles parsing of Swagger files.
148146
149147An example on how to use the ` x-nullable ` property to control if a property is optional:
150148
0 commit comments