Skip to content

Commit 4bc16ea

Browse files
authored
Added a Julia client and server (#14520)
* Added a Julia client and server This PR adds two new generators for the [Julia language](https://julialang.org/) - `julia-client` to generate a client from specifications - `julia-server` to generate a server with stubs that can be used to host a server conforming to the specifications The generated code uses the Julia [OpenAPI.jl](https://github.com/JuliaComputing/OpenAPI.jl) package that includes support functions for both client and server. * fix javadoc generation * add changes after ensure-up-to-date run
1 parent 28493df commit 4bc16ea

93 files changed

Lines changed: 6132 additions & 6 deletions

File tree

Some content is hidden

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

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Code change should conform to the programming style guide of the respective lang
6060
- Haskell: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
6161
- Java: https://google.github.io/styleguide/javaguide.html
6262
- JavaScript: https://github.com/airbnb/javascript/
63+
- Julia: https://docs.julialang.org/en/v1/manual/style-guide/
6364
- Kotlin: https://kotlinlang.org/docs/reference/coding-conventions.html
6465
- ObjC: https://github.com/NYTimes/objective-c-style-guide
6566
- Perl: http://perldoc.perl.org/perlstyle.html

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
7979

8080
| | Languages/Frameworks |
8181
| -------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
82-
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, 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, Helidon), **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 - 13.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
83-
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **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/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
82+
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, 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, Helidon), **Julia**, **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 - 13.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
83+
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **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/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
8484
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
8585
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
8686
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
generatorName: julia-client
2+
outputDir: samples/client/petstore/julia
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/julia-client
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"
7+
packageName: PetStoreClient
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
generatorName: julia-server
2+
outputDir: samples/server/petstore/julia
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/julia-server
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"
7+
packageName: PetStoreServer

docs/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Code change should conform to the programming style guide of the respective lang
6464
- Haskell: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
6565
- Java: https://google.github.io/styleguide/javaguide.html
6666
- JavaScript: https://github.com/airbnb/javascript/
67+
- Julia: https://docs.julialang.org/en/v1/manual/style-guide/
6768
- Kotlin: https://kotlinlang.org/docs/reference/coding-conventions.html
6869
- ObjC: https://github.com/NYTimes/objective-c-style-guide
6970
- Perl: http://perldoc.perl.org/perlstyle.html

docs/generators.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The following generators are available:
4040
* [javascript-flowtyped](generators/javascript-flowtyped.md)
4141
* [jaxrs-cxf-client](generators/jaxrs-cxf-client.md)
4242
* [jmeter](generators/jmeter.md)
43+
* [julia-client](generators/julia-client.md)
4344
* [k6 (beta)](generators/k6.md)
4445
* [kotlin](generators/kotlin.md)
4546
* [lua (beta)](generators/lua.md)
@@ -110,6 +111,7 @@ The following generators are available:
110111
* [jaxrs-resteasy](generators/jaxrs-resteasy.md)
111112
* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md)
112113
* [jaxrs-spec](generators/jaxrs-spec.md)
114+
* [julia-server](generators/julia-server.md)
113115
* [kotlin-server](generators/kotlin-server.md)
114116
* [kotlin-spring](generators/kotlin-spring.md)
115117
* [kotlin-vertx (beta)](generators/kotlin-vertx.md)

docs/generators/jaxrs-cxf-client.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6565
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
6666
|sourceFolder|source folder for generated code| |src/gen/java|
6767
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
68-
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
6968
|useBeanValidation|Use BeanValidation API annotations| |false|
7069
|useGenericResponse|Use generic response| |false|
7170
|useGzipFeatureForTests|Use Gzip Feature for tests| |false|

docs/generators/jaxrs-cxf-extended.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
7878
|testDataFile|JSON file to contain generated test data| |null|
7979
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
8080
|title|a title describing the application| |OpenAPI Server|
81-
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
8281
|useAnnotatedBasePath|Use @Path annotations for basePath| |false|
8382
|useBeanValidation|Use BeanValidation API annotations| |true|
8483
|useBeanValidationFeature|Use BeanValidation Feature| |false|

docs/generators/jaxrs-cxf.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
7373
|sourceFolder|source folder for generated code| |src/gen/java|
7474
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
7575
|title|a title describing the application| |OpenAPI Server|
76-
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
7776
|useAnnotatedBasePath|Use @Path annotations for basePath| |false|
7877
|useBeanValidation|Use BeanValidation API annotations| |true|
7978
|useBeanValidationFeature|Use BeanValidation Feature| |false|

0 commit comments

Comments
 (0)