@@ -99,14 +99,13 @@ For anything more complicated, or for generating specs dynamically, you can also
99
99
100
100
#### CLI Options
101
101
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 |
110
109
111
110
### Node
112
111
@@ -131,20 +130,19 @@ If your specs are in YAML, you’ll have to convert them to JS objects using a l
131
130
132
131
#### Node Options
133
132
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. |
140
138
141
139
#### PropertyMapper
142
140
143
141
In order to allow more control over how properties are parsed, and to specifically handle
144
142
` x-something ` -properties, the ` propertyMapper ` option may be specified.
145
143
146
144
This 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.
148
146
149
147
An example on how to use the ` x-nullable ` property to control if a property is optional:
150
148
0 commit comments