Skip to content

Add Nim client code generator #3879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 49 commits into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f266380
First version of Nim Client
hokamoto Sep 1, 2019
18d367a
Add some codes
hokamoto Sep 5, 2019
9639569
Add some codes
hokamoto Sep 5, 2019
a999b5e
Add some codes
hokamoto Sep 8, 2019
5d73b11
Add some codes
hokamoto Sep 8, 2019
3880039
Add some codes
hokamoto Sep 12, 2019
c48f0a0
First version of Nim Client
hokamoto Sep 1, 2019
c5e4713
Add some codes
hokamoto Sep 5, 2019
feb96b1
Add some codes
hokamoto Sep 5, 2019
5fdc0ab
Add some codes
hokamoto Sep 8, 2019
ae33303
Add some codes
hokamoto Sep 8, 2019
ba35508
Add some codes
hokamoto Sep 12, 2019
fc74ece
[Dart] Fix README template and update testing doco (#3809)
nickmeinhold Sep 3, 2019
7b4a201
Support custom git repository (#3757)
qmuntal Sep 3, 2019
2451702
Add links to article and video (#3820)
wing328 Sep 3, 2019
9ef73eb
Better Go code format (#3819)
wing328 Sep 4, 2019
c90c6c8
Add gRPC Protobuf schema generator (#3818)
wing328 Sep 4, 2019
bdfed92
1792 fix remote spec handling and hash calculation (#3440)
Sep 4, 2019
7c5cfb7
fixed bug where nullApi.java would be generated. Instead, generated …
bensimpson-ch Sep 4, 2019
99eb680
Revert "1792 fix remote spec handling and hash calculation (#3440)"
wing328 Sep 4, 2019
ac1f19d
Add nickmeinhold to Dart technical committee (#3830)
wing328 Sep 4, 2019
9cbcebc
Bug #2845 typescript angular inheritance (#3812)
mnahkies Sep 5, 2019
9ba0dd0
fix warnings in csharp-netcore client (#3831)
wing328 Sep 5, 2019
5d21a8f
Add missing files to the form request (#3834)
etherealjoy Sep 5, 2019
8c637fb
[client][go] avoid duplicated reflect imports (#3847)
qmuntal Sep 6, 2019
f26f726
Following up for #3440 (1792 fix remote spec handling and hash calcul…
fujigon Sep 6, 2019
4a1eb91
Add a link (#3850)
ackintosh Sep 7, 2019
3228ca2
Add Element AI to the list (#3856)
wing328 Sep 7, 2019
2fb08fb
maven-plugin-plugin 3.6.0 (#3854)
sullis Sep 7, 2019
221443a
[Java][okhttp-gson] fix failure to deserialize floats (#3846)
bensimpson-ch Sep 7, 2019
adf1297
Adds Http Info To Dart Api (#3851)
austbot Sep 7, 2019
86adb0a
[C++][Pistache] Add missing setter for arrays (#3837)
muttleyxd Sep 7, 2019
82f00f2
typescript-inversify: improve check for required parameters, support …
bodograumann Sep 9, 2019
0f10987
[typescript-angular] allow empty string basePath (#3489)
martinnovak Sep 9, 2019
bf441c2
Fix/r/serialization fix and minor 3xx resp fix (#3817)
Ramanth Sep 10, 2019
e51ffbe
typescript-axios: Fix baseoptions (#3866)
7474 Sep 10, 2019
0396bb4
Rename gRPC generator to "protobuf-schema" (#3864)
wing328 Sep 10, 2019
3dd0ebd
Prepare v4.1.2 release (#3873)
wing328 Sep 11, 2019
58ec946
fix version in readme
macjohnny Sep 11, 2019
580ca11
BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3…
peyerroger Sep 11, 2019
fbb3b27
update doc, samples (#3875)
wing328 Sep 11, 2019
549fc8f
update stable release
wing328 Sep 11, 2019
bface47
Update the batch for Windows
hokamoto Sep 12, 2019
5a28be0
Merge branch 'nim-client' of github.com:hokamoto/openapi-generator in…
hokamoto Sep 12, 2019
19cc13b
Merge remote-tracking branch 'upstream/master' into nim-client
hokamoto Sep 12, 2019
2db44c7
Add a test snippet
hokamoto Sep 12, 2019
bcec49b
Update ensure-up-to-date
hokamoto Sep 12, 2019
7276034
Add Nim to README.md
hokamoto Sep 12, 2019
090875b
Ran ensure-up-to-date to pass CircleCI tests
hokamoto Sep 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se

| | Languages/Frameworks |
|-|-|
**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), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **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), **Kotlin**, **Lua**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
**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), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **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), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **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)), **Kotlin** (Spring Boot, Ktor), **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** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
**API documentation generators** | **HTML**, **Confluence Wiki**
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
Expand Down Expand Up @@ -699,6 +699,7 @@ Here is a list of template creators:
* JMeter: @davidkiss
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Lua: @daurnimator
* Nim: @hokamoto
* OCaml: @cgensoul
* Perl: @wing328 [:heart:](https://www.patreon.com/wing328)
* PHP (Guzzle): @baartosz
Expand Down Expand Up @@ -825,6 +826,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) |
| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) |
| Lua | @daurnimator (2017/08) |
| Nim | |
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
| ObjC | |
| OCaml | @cgensoul (2019/08) |
Expand Down
31 changes: 31 additions & 0 deletions bin/nim-client-petstore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

SCRIPT="$0"

while [ -h "$SCRIPT" ] ; do
ls=$(ls -ld "$SCRIPT")
link=$(expr "$ls" : '.*-> \(.*\)$')
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=$(dirname "$SCRIPT")/"$link"
fi
done

if [ ! -d "${APP_DIR}" ]; then
APP_DIR=$(dirname "$SCRIPT")/..
APP_DIR=$(cd "${APP_DIR}"; pwd)
fi

executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

if [ ! -f "$executable" ]
then
mvn clean package
fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/openapi-generator/src/main/resources/nim-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml --additional-properties packageName=petstore -g nim -o samples/client/petstore/nim"

java ${JAVA_OPTS} -jar ${executable} ${ags}
1 change: 1 addition & 0 deletions bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ declare -a scripts=(
"./bin/kotlin-springboot-petstore-server.sh"
"./bin/kotlin-springboot-petstore-server-reactive.sh"
"./bin/mysql-schema-petstore.sh"
"./bin/nim-client-petstore.sh"
"./bin/python-petstore-all.sh"
"./bin/openapi3/python-petstore.sh"
"./bin/php-petstore.sh"
Expand Down
10 changes: 10 additions & 0 deletions bin/windows/nim-client-petstore.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar

If Not Exist %executable% (
mvn clean package
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "nim-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml --additional-properties packageName=petstore -g nim -o samples\client\petstore\nim

java %JAVA_OPTS% -jar %executable% %ags%
1 change: 1 addition & 0 deletions docs/generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The following generators are available:
* [jmeter](generators/jmeter)
* [kotlin](generators/kotlin)
* [lua](generators/lua)
* [nim](generators/nim)
* [objc](generators/objc)
* [ocaml](generators/ocaml)
* [perl](generators/perl)
Expand Down
13 changes: 13 additions & 0 deletions docs/generators/nim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

---
id: generator-opts-client-nim
title: Config Options for nim
sidebar_label: nim
---

| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
Loading