|
| 1 | +--- |
| 2 | +title: Documentation for the rust-axum Generator |
| 3 | +--- |
| 4 | + |
| 5 | +## METADATA |
| 6 | + |
| 7 | +| Property | Value | Notes | |
| 8 | +| -------- | ----- | ----- | |
| 9 | +| generator name | rust-axum | pass this to the generate command after -g | |
| 10 | +| generator stability | BETA | | |
| 11 | +| generator type | SERVER | | |
| 12 | +| generator language | Rust | | |
| 13 | +| generator default templating engine | mustache | | |
| 14 | +| helpTxt | Generates a Rust server library which bases on Axum. | | |
| 15 | + |
| 16 | +## CONFIG OPTIONS |
| 17 | +These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. |
| 18 | + |
| 19 | +| Option | Description | Values | Default | |
| 20 | +| ------ | ----------- | ------ | ------- | |
| 21 | +|allowBlockingResponseSerialize|By default, json/form-urlencoded response serialization, which might perform a lot of compute in a future without yielding, is executed on a blocking thread via tokio::task::spawn_blocking. Set this option to true will override this behaviour and allow blocking call to happen. It helps to improve the performance when response serialization (e.g. returns tiny data) is low cost.| |false| |
| 22 | +|allowBlockingValidator|By default, validation process, which might perform a lot of compute in a future without yielding, is executed on a blocking thread via tokio::task::spawn_blocking. Set this option to true will override this behaviour and allow blocking call to happen. It helps to improve the performance when validating request-data (header, path, query, body) is low cost.| |false| |
| 23 | +|disableValidator|Disable validating request-data (header, path, query, body) against OpenAPI Schema Specification.| |false| |
| 24 | +|packageName|Rust crate name (convention: snake_case).| |openapi| |
| 25 | +|packageVersion|Rust crate version.| |null| |
| 26 | + |
| 27 | +## IMPORT MAPPING |
| 28 | + |
| 29 | +| Type/Alias | Imports | |
| 30 | +| ---------- | ------- | |
| 31 | + |
| 32 | + |
| 33 | +## INSTANTIATION TYPES |
| 34 | + |
| 35 | +| Type/Alias | Instantiated By | |
| 36 | +| ---------- | --------------- | |
| 37 | +|array|Vec| |
| 38 | +|map|std::collections::HashMap| |
| 39 | + |
| 40 | + |
| 41 | +## LANGUAGE PRIMITIVES |
| 42 | + |
| 43 | +<ul class="column-ul"> |
| 44 | +<li>String</li> |
| 45 | +<li>bool</li> |
| 46 | +<li>char</li> |
| 47 | +<li>f32</li> |
| 48 | +<li>f64</li> |
| 49 | +<li>i16</li> |
| 50 | +<li>i32</li> |
| 51 | +<li>i64</li> |
| 52 | +<li>i8</li> |
| 53 | +<li>isize</li> |
| 54 | +<li>str</li> |
| 55 | +<li>u16</li> |
| 56 | +<li>u32</li> |
| 57 | +<li>u64</li> |
| 58 | +<li>u8</li> |
| 59 | +<li>usize</li> |
| 60 | +</ul> |
| 61 | + |
| 62 | +## RESERVED WORDS |
| 63 | + |
| 64 | +<ul class="column-ul"> |
| 65 | +<li>Self</li> |
| 66 | +<li>abstract</li> |
| 67 | +<li>as</li> |
| 68 | +<li>async</li> |
| 69 | +<li>await</li> |
| 70 | +<li>become</li> |
| 71 | +<li>box</li> |
| 72 | +<li>break</li> |
| 73 | +<li>const</li> |
| 74 | +<li>continue</li> |
| 75 | +<li>crate</li> |
| 76 | +<li>do</li> |
| 77 | +<li>dyn</li> |
| 78 | +<li>else</li> |
| 79 | +<li>enum</li> |
| 80 | +<li>extern</li> |
| 81 | +<li>false</li> |
| 82 | +<li>final</li> |
| 83 | +<li>fn</li> |
| 84 | +<li>for</li> |
| 85 | +<li>if</li> |
| 86 | +<li>impl</li> |
| 87 | +<li>in</li> |
| 88 | +<li>let</li> |
| 89 | +<li>loop</li> |
| 90 | +<li>macro</li> |
| 91 | +<li>match</li> |
| 92 | +<li>mod</li> |
| 93 | +<li>move</li> |
| 94 | +<li>mut</li> |
| 95 | +<li>override</li> |
| 96 | +<li>priv</li> |
| 97 | +<li>pub</li> |
| 98 | +<li>ref</li> |
| 99 | +<li>return</li> |
| 100 | +<li>self</li> |
| 101 | +<li>static</li> |
| 102 | +<li>struct</li> |
| 103 | +<li>super</li> |
| 104 | +<li>trait</li> |
| 105 | +<li>true</li> |
| 106 | +<li>try</li> |
| 107 | +<li>type</li> |
| 108 | +<li>typeof</li> |
| 109 | +<li>unsafe</li> |
| 110 | +<li>unsized</li> |
| 111 | +<li>use</li> |
| 112 | +<li>virtual</li> |
| 113 | +<li>where</li> |
| 114 | +<li>while</li> |
| 115 | +<li>yield</li> |
| 116 | +</ul> |
| 117 | + |
| 118 | +## FEATURE SET |
| 119 | + |
| 120 | + |
| 121 | +### Client Modification Feature |
| 122 | +| Name | Supported | Defined By | |
| 123 | +| ---- | --------- | ---------- | |
| 124 | +|BasePath|✗|ToolingExtension |
| 125 | +|Authorizations|✗|ToolingExtension |
| 126 | +|UserAgent|✗|ToolingExtension |
| 127 | +|MockServer|✗|ToolingExtension |
| 128 | + |
| 129 | +### Data Type Feature |
| 130 | +| Name | Supported | Defined By | |
| 131 | +| ---- | --------- | ---------- | |
| 132 | +|Custom|✗|OAS2,OAS3 |
| 133 | +|Int32|✓|OAS2,OAS3 |
| 134 | +|Int64|✓|OAS2,OAS3 |
| 135 | +|Float|✓|OAS2,OAS3 |
| 136 | +|Double|✓|OAS2,OAS3 |
| 137 | +|Decimal|✓|ToolingExtension |
| 138 | +|String|✓|OAS2,OAS3 |
| 139 | +|Byte|✓|OAS2,OAS3 |
| 140 | +|Binary|✓|OAS2,OAS3 |
| 141 | +|Boolean|✓|OAS2,OAS3 |
| 142 | +|Date|✓|OAS2,OAS3 |
| 143 | +|DateTime|✓|OAS2,OAS3 |
| 144 | +|Password|✓|OAS2,OAS3 |
| 145 | +|File|✓|OAS2 |
| 146 | +|Uuid|✗| |
| 147 | +|Array|✓|OAS2,OAS3 |
| 148 | +|Null|✗|OAS3 |
| 149 | +|AnyType|✗|OAS2,OAS3 |
| 150 | +|Object|✓|OAS2,OAS3 |
| 151 | +|Maps|✓|ToolingExtension |
| 152 | +|CollectionFormat|✓|OAS2 |
| 153 | +|CollectionFormatMulti|✓|OAS2 |
| 154 | +|Enum|✓|OAS2,OAS3 |
| 155 | +|ArrayOfEnum|✓|ToolingExtension |
| 156 | +|ArrayOfModel|✓|ToolingExtension |
| 157 | +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension |
| 158 | +|ArrayOfCollectionOfModel|✓|ToolingExtension |
| 159 | +|ArrayOfCollectionOfEnum|✓|ToolingExtension |
| 160 | +|MapOfEnum|✓|ToolingExtension |
| 161 | +|MapOfModel|✓|ToolingExtension |
| 162 | +|MapOfCollectionOfPrimitives|✓|ToolingExtension |
| 163 | +|MapOfCollectionOfModel|✓|ToolingExtension |
| 164 | +|MapOfCollectionOfEnum|✓|ToolingExtension |
| 165 | + |
| 166 | +### Documentation Feature |
| 167 | +| Name | Supported | Defined By | |
| 168 | +| ---- | --------- | ---------- | |
| 169 | +|Readme|✗|ToolingExtension |
| 170 | +|Model|✓|ToolingExtension |
| 171 | +|Api|✓|ToolingExtension |
| 172 | + |
| 173 | +### Global Feature |
| 174 | +| Name | Supported | Defined By | |
| 175 | +| ---- | --------- | ---------- | |
| 176 | +|Host|✓|OAS2,OAS3 |
| 177 | +|BasePath|✓|OAS2,OAS3 |
| 178 | +|Info|✗|OAS2,OAS3 |
| 179 | +|Schemes|✗|OAS2,OAS3 |
| 180 | +|PartialSchemes|✓|OAS2,OAS3 |
| 181 | +|Consumes|✓|OAS2 |
| 182 | +|Produces|✓|OAS2 |
| 183 | +|ExternalDocumentation|✗|OAS2,OAS3 |
| 184 | +|Examples|✗|OAS2,OAS3 |
| 185 | +|XMLStructureDefinitions|✗|OAS2,OAS3 |
| 186 | +|MultiServer|✗|OAS3 |
| 187 | +|ParameterizedServer|✗|OAS3 |
| 188 | +|ParameterStyling|✗|OAS3 |
| 189 | +|Callbacks|✗|OAS3 |
| 190 | +|LinkObjects|✗|OAS3 |
| 191 | + |
| 192 | +### Parameter Feature |
| 193 | +| Name | Supported | Defined By | |
| 194 | +| ---- | --------- | ---------- | |
| 195 | +|Path|✓|OAS2,OAS3 |
| 196 | +|Query|✓|OAS2,OAS3 |
| 197 | +|Header|✓|OAS2,OAS3 |
| 198 | +|Body|✓|OAS2 |
| 199 | +|FormUnencoded|✓|OAS2 |
| 200 | +|FormMultipart|✓|OAS2 |
| 201 | +|Cookie|✗|OAS3 |
| 202 | + |
| 203 | +### Schema Support Feature |
| 204 | +| Name | Supported | Defined By | |
| 205 | +| ---- | --------- | ---------- | |
| 206 | +|Simple|✓|OAS2,OAS3 |
| 207 | +|Composite|✓|OAS2,OAS3 |
| 208 | +|Polymorphism|✗|OAS2,OAS3 |
| 209 | +|Union|✗|OAS3 |
| 210 | +|allOf|✗|OAS2,OAS3 |
| 211 | +|anyOf|✗|OAS3 |
| 212 | +|oneOf|✗|OAS3 |
| 213 | +|not|✗|OAS3 |
| 214 | + |
| 215 | +### Security Feature |
| 216 | +| Name | Supported | Defined By | |
| 217 | +| ---- | --------- | ---------- | |
| 218 | +|BasicAuth|✓|OAS2,OAS3 |
| 219 | +|ApiKey|✓|OAS2,OAS3 |
| 220 | +|OpenIDConnect|✗|OAS3 |
| 221 | +|BearerToken|✓|OAS3 |
| 222 | +|OAuth2_Implicit|✓|OAS2,OAS3 |
| 223 | +|OAuth2_Password|✓|OAS2,OAS3 |
| 224 | +|OAuth2_ClientCredentials|✓|OAS2,OAS3 |
| 225 | +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 |
| 226 | +|SignatureAuth|✗|OAS3 |
| 227 | +|AWSV4Signature|✗|ToolingExtension |
| 228 | + |
| 229 | +### Wire Format Feature |
| 230 | +| Name | Supported | Defined By | |
| 231 | +| ---- | --------- | ---------- | |
| 232 | +|JSON|✓|OAS2,OAS3 |
| 233 | +|XML|✗|OAS2,OAS3 |
| 234 | +|PROTOBUF|✗|ToolingExtension |
| 235 | +|Custom|✓|OAS2,OAS3 |
0 commit comments