Skip to content

Commit

Permalink
Added a Julia client and server (OpenAPITools#14520)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tanmaykm authored Jan 30, 2023
1 parent 28493df commit 4bc16ea
Show file tree
Hide file tree
Showing 93 changed files with 6,132 additions and 6 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Code change should conform to the programming style guide of the respective lang
- Haskell: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
- Java: https://google.github.io/styleguide/javaguide.html
- JavaScript: https://github.com/airbnb/javascript/
- Julia: https://docs.julialang.org/en/v1/manual/style-guide/
- Kotlin: https://kotlinlang.org/docs/reference/coding-conventions.html
- ObjC: https://github.com/NYTimes/objective-c-style-guide
- Perl: http://perldoc.perl.org/perlstyle.html
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ 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.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) |
| **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) |
| **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) |
| **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) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
Expand Down
7 changes: 7 additions & 0 deletions bin/configs/julia-client-petstore-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generatorName: julia-client
outputDir: samples/client/petstore/julia
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/julia-client
additionalProperties:
hideGenerationTimestamp: "true"
packageName: PetStoreClient
7 changes: 7 additions & 0 deletions bin/configs/julia-server-petstore-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generatorName: julia-server
outputDir: samples/server/petstore/julia
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/julia-server
additionalProperties:
hideGenerationTimestamp: "true"
packageName: PetStoreServer
1 change: 1 addition & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Code change should conform to the programming style guide of the respective lang
- Haskell: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
- Java: https://google.github.io/styleguide/javaguide.html
- JavaScript: https://github.com/airbnb/javascript/
- Julia: https://docs.julialang.org/en/v1/manual/style-guide/
- Kotlin: https://kotlinlang.org/docs/reference/coding-conventions.html
- ObjC: https://github.com/NYTimes/objective-c-style-guide
- Perl: http://perldoc.perl.org/perlstyle.html
Expand Down
2 changes: 2 additions & 0 deletions docs/generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The following generators are available:
* [javascript-flowtyped](generators/javascript-flowtyped.md)
* [jaxrs-cxf-client](generators/jaxrs-cxf-client.md)
* [jmeter](generators/jmeter.md)
* [julia-client](generators/julia-client.md)
* [k6 (beta)](generators/k6.md)
* [kotlin](generators/kotlin.md)
* [lua (beta)](generators/lua.md)
Expand Down Expand Up @@ -110,6 +111,7 @@ The following generators are available:
* [jaxrs-resteasy](generators/jaxrs-resteasy.md)
* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md)
* [jaxrs-spec](generators/jaxrs-spec.md)
* [julia-server](generators/julia-server.md)
* [kotlin-server](generators/kotlin-server.md)
* [kotlin-spring](generators/kotlin-spring.md)
* [kotlin-vertx (beta)](generators/kotlin-vertx.md)
Expand Down
1 change: 0 additions & 1 deletion docs/generators/jaxrs-cxf-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|sourceFolder|source folder for generated code| |src/gen/java|
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
|useBeanValidation|Use BeanValidation API annotations| |false|
|useGenericResponse|Use generic response| |false|
|useGzipFeatureForTests|Use Gzip Feature for tests| |false|
Expand Down
1 change: 0 additions & 1 deletion docs/generators/jaxrs-cxf-extended.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|testDataFile|JSON file to contain generated test data| |null|
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|title|a title describing the application| |OpenAPI Server|
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
|useAnnotatedBasePath|Use @Path annotations for basePath| |false|
|useBeanValidation|Use BeanValidation API annotations| |true|
|useBeanValidationFeature|Use BeanValidation Feature| |false|
Expand Down
1 change: 0 additions & 1 deletion docs/generators/jaxrs-cxf.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sourceFolder|source folder for generated code| |src/gen/java|
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|title|a title describing the application| |OpenAPI Server|
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
|useAnnotatedBasePath|Use @Path annotations for basePath| |false|
|useBeanValidation|Use BeanValidation API annotations| |true|
|useBeanValidationFeature|Use BeanValidation Feature| |false|
Expand Down
Loading

0 comments on commit 4bc16ea

Please sign in to comment.