Skip to content

Commit ae430a8

Browse files
authored
[cpp][tiny] rename generator, update samples (#9560)
* rename generator, update samples * add doc * update readme
1 parent 6c40192 commit ae430a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+5070
-38
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
6767

6868
| | Languages/Frameworks |
6969
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
70-
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0, .NET 5.0. Libraries: RestSharp, HttpClient), **C++** (cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
70+
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0, .NET 5.0. Libraries: RestSharp, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
7171
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
7272
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
7373
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
@@ -843,6 +843,7 @@ Here is a list of template creators:
843843
* Bash: @bkryza
844844
* C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant)
845845
* C++ REST: @Danielku15
846+
* C++ Tiny: @AndersSpringborg
846847
* C++ UE4: @Kahncode
847848
* C# (.NET 2.0): @who
848849
* C# (.NET Standard 1.3 ): @Gronsak
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
generatorName: tiny-cpp
2-
outputDir: samples/client/petstore/tiny/cpp
1+
generatorName: cpp-tiny
2+
outputDir: samples/client/petstore/cpp-tiny
33
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4-
templateDir: modules/openapi-generator/src/main/resources/tiny-cpp-client
4+
templateDir: modules/openapi-generator/src/main/resources/cpp-tiny
55
additionalProperties:
66
hideGenerationTimestamp: "true"
77
controller: "esp32"

docs/generators.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The following generators are available:
1414
* [clojure](generators/clojure.md)
1515
* [cpp-qt-client](generators/cpp-qt-client.md)
1616
* [cpp-restsdk](generators/cpp-restsdk.md)
17+
* [cpp-tiny (beta)](generators/cpp-tiny.md)
1718
* [cpp-tizen](generators/cpp-tizen.md)
1819
* [cpp-ue4 (beta)](generators/cpp-ue4.md)
1920
* [crystal (beta)](generators/crystal.md)

docs/generators/cpp-tiny.md

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
---
2+
title: Config Options for cpp-tiny
3+
sidebar_label: cpp-tiny
4+
---
5+
6+
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.
7+
8+
| Option | Description | Values | Default |
9+
| ------ | ----------- | ------ | ------- |
10+
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
11+
|controller|name of microcontroller (e.g esp32 or esp8266)| |esp32|
12+
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
13+
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
14+
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
15+
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
16+
|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
17+
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
18+
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
19+
|variableNameFirstCharacterUppercase|Make first character of variable name uppercase (eg. value -&gt; Value)| |true|
20+
21+
## IMPORT MAPPING
22+
23+
| Type/Alias | Imports |
24+
| ---------- | ------- |
25+
26+
27+
## INSTANTIATION TYPES
28+
29+
| Type/Alias | Instantiated By |
30+
| ---------- | --------------- |
31+
32+
33+
## LANGUAGE PRIMITIVES
34+
35+
<ul class="column-ul">
36+
<li>bool</li>
37+
<li>double</li>
38+
<li>float</li>
39+
<li>int</li>
40+
<li>long</li>
41+
<li>std::string</li>
42+
</ul>
43+
44+
## RESERVED WORDS
45+
46+
<ul class="column-ul">
47+
<li>alignas</li>
48+
<li>alignof</li>
49+
<li>and</li>
50+
<li>and_eq</li>
51+
<li>asm</li>
52+
<li>auto</li>
53+
<li>bitand</li>
54+
<li>bitor</li>
55+
<li>bool</li>
56+
<li>break</li>
57+
<li>case</li>
58+
<li>catch</li>
59+
<li>char</li>
60+
<li>char16_t</li>
61+
<li>char32_t</li>
62+
<li>class</li>
63+
<li>compl</li>
64+
<li>concept</li>
65+
<li>const</li>
66+
<li>const_cast</li>
67+
<li>constexpr</li>
68+
<li>continue</li>
69+
<li>decltype</li>
70+
<li>default</li>
71+
<li>delete</li>
72+
<li>do</li>
73+
<li>double</li>
74+
<li>dynamic_cast</li>
75+
<li>else</li>
76+
<li>enum</li>
77+
<li>explicit</li>
78+
<li>export</li>
79+
<li>extern</li>
80+
<li>false</li>
81+
<li>float</li>
82+
<li>for</li>
83+
<li>friend</li>
84+
<li>goto</li>
85+
<li>if</li>
86+
<li>inline</li>
87+
<li>int</li>
88+
<li>linux</li>
89+
<li>long</li>
90+
<li>mutable</li>
91+
<li>namespace</li>
92+
<li>new</li>
93+
<li>noexcept</li>
94+
<li>not</li>
95+
<li>not_eq</li>
96+
<li>nullptr</li>
97+
<li>operator</li>
98+
<li>or</li>
99+
<li>or_eq</li>
100+
<li>private</li>
101+
<li>protected</li>
102+
<li>public</li>
103+
<li>register</li>
104+
<li>reinterpret_cast</li>
105+
<li>requires</li>
106+
<li>return</li>
107+
<li>short</li>
108+
<li>signed</li>
109+
<li>sizeof</li>
110+
<li>static</li>
111+
<li>static_assert</li>
112+
<li>static_cast</li>
113+
<li>struct</li>
114+
<li>switch</li>
115+
<li>template</li>
116+
<li>this</li>
117+
<li>thread_local</li>
118+
<li>throw</li>
119+
<li>true</li>
120+
<li>try</li>
121+
<li>typedef</li>
122+
<li>typeid</li>
123+
<li>typename</li>
124+
<li>union</li>
125+
<li>unsigned</li>
126+
<li>using</li>
127+
<li>virtual</li>
128+
<li>void</li>
129+
<li>volatile</li>
130+
<li>wchar_t</li>
131+
<li>while</li>
132+
<li>xor</li>
133+
<li>xor_eq</li>
134+
</ul>
135+
136+
## FEATURE SET
137+
138+
139+
### Client Modification Feature
140+
| Name | Supported | Defined By |
141+
| ---- | --------- | ---------- |
142+
|BasePath|✗|ToolingExtension
143+
|Authorizations|✗|ToolingExtension
144+
|UserAgent|✗|ToolingExtension
145+
|MockServer|✗|ToolingExtension
146+
147+
### Data Type Feature
148+
| Name | Supported | Defined By |
149+
| ---- | --------- | ---------- |
150+
|Custom|✗|OAS2,OAS3
151+
|Int32|✓|OAS2,OAS3
152+
|Int64|✓|OAS2,OAS3
153+
|Float|✓|OAS2,OAS3
154+
|Double|✓|OAS2,OAS3
155+
|Decimal|✓|ToolingExtension
156+
|String|✓|OAS2,OAS3
157+
|Byte|✓|OAS2,OAS3
158+
|Binary|✓|OAS2,OAS3
159+
|Boolean|✓|OAS2,OAS3
160+
|Date|✓|OAS2,OAS3
161+
|DateTime|✓|OAS2,OAS3
162+
|Password|✓|OAS2,OAS3
163+
|File|✓|OAS2
164+
|Array|✓|OAS2,OAS3
165+
|Maps|✗|ToolingExtension
166+
|CollectionFormat|✓|OAS2
167+
|CollectionFormatMulti|✓|OAS2
168+
|Enum|✗|OAS2,OAS3
169+
|ArrayOfEnum|✓|ToolingExtension
170+
|ArrayOfModel|✓|ToolingExtension
171+
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
172+
|ArrayOfCollectionOfModel|✓|ToolingExtension
173+
|ArrayOfCollectionOfEnum|✓|ToolingExtension
174+
|MapOfEnum|✗|ToolingExtension
175+
|MapOfModel|✗|ToolingExtension
176+
|MapOfCollectionOfPrimitives|✗|ToolingExtension
177+
|MapOfCollectionOfModel|✗|ToolingExtension
178+
|MapOfCollectionOfEnum|✗|ToolingExtension
179+
180+
### Documentation Feature
181+
| Name | Supported | Defined By |
182+
| ---- | --------- | ---------- |
183+
|Readme|✓|ToolingExtension
184+
|Model|✓|ToolingExtension
185+
|Api|✓|ToolingExtension
186+
187+
### Global Feature
188+
| Name | Supported | Defined By |
189+
| ---- | --------- | ---------- |
190+
|Host|✓|OAS2,OAS3
191+
|BasePath|✓|OAS2,OAS3
192+
|Info|✓|OAS2,OAS3
193+
|Schemes|✗|OAS2,OAS3
194+
|PartialSchemes|✓|OAS2,OAS3
195+
|Consumes|✓|OAS2
196+
|Produces|✓|OAS2
197+
|ExternalDocumentation|✓|OAS2,OAS3
198+
|Examples|✓|OAS2,OAS3
199+
|XMLStructureDefinitions|✗|OAS2,OAS3
200+
|MultiServer|✗|OAS3
201+
|ParameterizedServer|✗|OAS3
202+
|ParameterStyling|✗|OAS3
203+
|Callbacks|✗|OAS3
204+
|LinkObjects|✗|OAS3
205+
206+
### Parameter Feature
207+
| Name | Supported | Defined By |
208+
| ---- | --------- | ---------- |
209+
|Path|✓|OAS2,OAS3
210+
|Query|✗|OAS2,OAS3
211+
|Header|✗|OAS2,OAS3
212+
|Body|✓|OAS2
213+
|FormUnencoded|✗|OAS2
214+
|FormMultipart|✗|OAS2
215+
|Cookie|✗|OAS3
216+
217+
### Schema Support Feature
218+
| Name | Supported | Defined By |
219+
| ---- | --------- | ---------- |
220+
|Simple|✓|OAS2,OAS3
221+
|Composite|✓|OAS2,OAS3
222+
|Polymorphism|✗|OAS2,OAS3
223+
|Union|✗|OAS3
224+
225+
### Security Feature
226+
| Name | Supported | Defined By |
227+
| ---- | --------- | ---------- |
228+
|BasicAuth|✓|OAS2,OAS3
229+
|ApiKey|✓|OAS2,OAS3
230+
|OpenIDConnect|✗|OAS3
231+
|BearerToken|✓|OAS3
232+
|OAuth2_Implicit|✓|OAS2,OAS3
233+
|OAuth2_Password|✓|OAS2,OAS3
234+
|OAuth2_ClientCredentials|✓|OAS2,OAS3
235+
|OAuth2_AuthorizationCode|✓|OAS2,OAS3
236+
237+
### Wire Format Feature
238+
| Name | Supported | Defined By |
239+
| ---- | --------- | ---------- |
240+
|JSON|✓|OAS2,OAS3
241+
|XML|✗|OAS2,OAS3
242+
|PROTOBUF|✗|ToolingExtension
243+
|Custom|✗|OAS2,OAS3

0 commit comments

Comments
 (0)