Skip to content

v4.0.0 release

Compare
Choose a tag to compare
@wing328 wing328 released this 13 May 13:50
· 8478 commits to master since this release
3744273

4.0.0 is the first major release since the project's public debate in May 2018. Once again we appreciate all the contributions from the community to make this happen. This release comes with breaking changes with fallbacks and without fallbacks. Please refer to the following lists for more information:

For a full list of changes, please refer to the "Pull requests" tab.

New Generators 🆕 :

  • csharp-netcore
  • fsharp-giraffe-server
  • graphql-nodejs-express-server
  • typescript-rxjs

Here are some highlights:

📕 = Breaking changes without fallback
📒 = Breaking changes with fallback

General

  • [core] add support for model as query params #2489
  • Correct issue with OAuth scopes not propogated correctly #1982
  • Better handling of inline composed schemas in InlineModelResolver #2112
  • Update swagger-parser-version to 2.0.13-OpenAPITools.org-1 #2775
  • [docs] Document new templating engine, adding ability to reference templates #2773
  • [all] Adds strict spec option #2783
  • [general] Remove swagger-codegen "lang" mappings #2785 📒
  • [templating] Load TemplatingEngineAdapter via Service Provider #2755
  • Improve InlineModelResolver: MapSchema support #1800
  • Better support for composed schema (allOf) #1842
  • Better handling of OAuth security schema #1838
  • Refactor InlineModelResolver #1788
  • Deprecated initialCaps #1821
  • Delete unused method #1744 📕
  • Remove self-reference import #1758
  • Better handling of allOf (composition) #1757
  • Various fixes for free-form objects #1751
  • [OAS 3.0] Fix composed oneOf type #1750
  • Add support for multiple inheritance #1664
  • Fix alias to free form object & map #1638
  • Remove isNotContainer (mustache tag)#1629 📒
  • Introduced GeneratorProperties as a thread-safe clone of System Properties #1598
  • Delete --lang option #1592 📕
  • Better OpenAPI spec v3 support: allOf, anyOf, oneOf #1360

Android

  • [GRADLE] upgrade to 2.14.1 in java/scala/androit client to fix Vulnerability #2416

C

  • [C] C generator refactored #2463 📕

C#

  • Add warning about .net 2.0 framework reached EOL #2804
  • [C#][.NET Core] fix map instantiation in models extending Dictionary #2776
  • Remove emitDefaultValue option from C# generators #2559 📒
  • [aspnetcore] Support async tasks and some code cleanups #2629
  • [Aspnetcore] add nullable support to parameters and properties #2529
  • [Csharp] add nullable support to API client #2528
  • Rename generator: csharp-refactor => csharp-netcore #2348
  • [aspnetcore] more configurable and generate abstract class library #2282
  • [aspnetcore] migrate the docker image for the aspnetcore generator #2281
  • C# refactor improvements: .NET Standard and .NET Core #2187
  • Fix C# discriminator's mapping name #1942
  • Use CompareNetObject for object comparison in C# client (refactor) #1765

C++

  • [C++][Qt5] Fix generation of optional file when model name prefix is selected #2341
  • [C++][Qt5] Add enum support for client and server #2339
  • [C++][Qt5 Server] Add support for free form object in requests #2288
  • [C++] Use super class methods for Model and Api Filenames #2787
  • [C++][Pistache] Allow socket address reuse option #2780
  • [C++][Qt5 Server] Process server port #2782
  • [C++][RESTSDK] support enums #2749
  • [C++][RestSDK] Windows vcpkg vs2017 support #2751
  • [C++][Pistache]Add server port processing #2743
  • [C++][QT5] Emit worker also in response signal #1829
  • [C++][Pistache] Fix missing const keyword in array and maps #1828
  • [cpp-qt5] client response headers and validation of properties for client and server #1508

Clojure

  • [Clojure] Fix tests: stop dashizing props names #1310
  • [Clojure] Add model generation and conforming #122 📕

Dart

  • [Dart] Fix authentication for HTTP basic, API keys #2419
  • [Dart] query arguments of requests are now url encoded #2250
  • dart2: Do not add non-nullable fields to JSON string of models #2777

Elixir

  • [Elixir] update to 1.6 version #2741
  • [Elixir] Deserialize responses based on status code #2355
  • [Elixir] Update Tesla dependency to version 1.0 #2326

Elm

  • [elm] Update ISO 8601 library (fixes missing time zone designator) #2545
  • [elm] Import types in operations #2488
  • [Elm] Bugfix .encode in modelTypeDiscriminator #2807
  • [Elm] Fix repetitive enum prefixes #2784
  • [elm] Enable setting Http request trackers #1609
  • [elm] Allow setting base path for each request #1538
  • Add support for UUIDs #1516 📕
  • Update Elm for elm/http 2.0.0 #1510 📕

Erlang

  • Introduce optional weight function for commands and other improvements #1618
  • Upgrade the erlang-server dependency from cowboy1.x to cowboy2.x #1364 📕

F#

  • [F#] minor improvements #2825
  • Add beta server stub generator for F#/Giraffe #2802

Go

  • [Golang][client] Make it possible to generate go.mod and go.sum files #2813
  • [go] fix multipart for non-file inputs #2792
  • [go] support decoding plain string responses #2414
  • [Go] Fix up json check regexp and support vendor-specific mime types #2322

GraphQL

  • New Generator: GraphQL Server #1603

Haskell

  • [haskell-servant] Fix parsing of special characters #2676
  • [haskell-servant] Add some missing types to the generated modules #2675
  • [haskell-http-client] add cli option customTestInstanceModule #2406
  • [haskell-http-client] add support for import-mappings #2381
  • haskell-http-client: update katip version bound #2305
  • [haskell-http-client] Allow logger selection via cabal flags. Emit Consumes / for requestBody when not specified #2258

HTML

  • Update StaticHtmlGenerator to allow snake_case property names #2612
  • [html] Use ModelUtils to avoid NullPointerException #1948

Java

  • [JAVA][KOTLIN] fix var Naming for all uppercase with Numbers #2794
  • Mark Java (jersey1) client as deprecated #2767
  • [JAX-RS] Fix JSON polymorphism #2602
  • Fix JaxRS-Jersey template for files upload #2570
  • [Java][Feign] Support OAuth without 'expires_in' data #2563
  • Update Java Vertx client dependency #2507
  • [Java - OkHttp] Fix for the added interceptor and tests #2420
  • [GRADLE] upgrade to 2.14.1 in java/scala/androit client to fix Vulnerability #2416
  • Update Java client (okhttp-gson) dependencies #2368
  • [Java][okhttp-gson] Fix incorrect use of OkHttp interceptors #2356
  • rest-template: allow array parameters in path using collectionFormat #2177
  • okhttp-gson: allow array parameters in path using collectionFormat #2137
  • Add nullable array support in Java Spring generator #2660
  • [Java] Generate OAuth related files only if OAuth security schema is used #1907
  • [Java] Update okhttp version to the latest #1897
  • Improve Java model with instantiated lists #1683
  • Add nullable support to JAXRS-CXF parameters #1679
  • Add mavenCentral to build.gradle #1674

JavaScript

  • [Documentation] Add instructions to build the javascript client module #2806
  • [JavaScript] fix index.js, ApiClient.js and test files generated to incorrect location (invokerPackage) #2511
  • [JS][Flow] Fix body serialization when body is falsy #2499
  • Add build script and remove babel #2439
  • Add "servers" support to operation, path in the JS client #2060
  • Add Bearer authentication support to JS client #2020
  • Add multiple servers support to JS API client #1974
  • Use JS ES6 as the default #1825 📒

Kotlin

  • [Kotlin] add apiSuffix configuration #2690
  • [Kotlin SpringBoot Server] alternative: fix optional parameter not correctly declared in service #2539
  • [kotlin-spring] use spring resource for file handling #2455
  • [Kotlin] Add ability to use modelNamePrefix/modelNameSuffix #2349
  • [kotlin-spring] Allow DateTime to be remapped to others (LocalDateTIme) #1740

Perl

  • Perl: Better Support for hash in deserialization #2713
  • Use 4-space instead of tab in Perl templates #1830
  • Add "nullable" support to Perl operation's parameters #1690
  • Add multiple inheritance support to Perl client #1681

PHP

  • [Slim] Fix AbstractAuthenticator constructor TypeError #2641
  • [Symfony] Replace deprecated Controller with new one #2146
  • [PHP-Symfony] Use Symfony Validator service #2143
  • Add "servers" support to the operation, path in PHP API client #2072
  • Add controller.service_arguments tag to controllers to make them public #2059
  • Enable serialization of non-null negative values (array, false, etc) #2032
  • Add Bearer authentication to PHP API client #2013
  • Add multiple servers support to PHP client #1964
  • [PHP] Bump minimum required version to PHP7.1 #1491 📕
  • [Slim] Abstract API controllers #1483 📕
  • [Slim] Migration to PHP7 #1263 📕
  • [PHP-Lumen] Lumen 5.6 support #212 📕

PowerShell

  • Add process utils class to add index to properties #1796

Python

  • [Python] add the multipart files after sanitization in api_client #2122
  • [Python Connexion Servers] BUGFIX: handle . in package names #2508
  • Added proxy headers option for urllib3 #2467
  • Adding retries option to override default value 3 of urllib3 #2460
  • Adds exceptions module to python clients #2393
  • [Python] add cookie support for authentication in the client #2367
  • Add python-blueplanet server generator #2184
  • [Python] Add "servers" support in path, operation #2052
  • [Python] handle nullable parameters with None added to allowed_values #2034
  • Add Bearer authentication support to Python client #1999
  • Add multiple servers support to Python client #1969
  • Set Python's pool_threads default value to 1 #1403 📒

R

  • Add better example code for R object #2492
  • R client refactoring #2215 📕

Ruby

  • Pass opts argument to api client in ruby-client #2754
  • [Ruby] Use Integer instead of Fixnum in Ruby client (#2475) #2481
  • [Ruby] Fix type mapping for Ruby #2386
  • Fix Ruby invalid enum generation for numeric enums #1945

Rust

  • [Rust Server] Support application/octet-stream as a required body parameter #2725
  • [Rust Server] Improve XML support #2504
  • [rust-server] Added API Key auth to rust-server #2459
  • Support nullable fields in the Rust generator #2353
  • Use oauth token for basic bearer auth in Rust #2161
  • [Rust] Support formParams and fix list-params #1678
  • Better context errors #1198 📕

Scala

  • Fix Scala client (Akka) return type #2510
  • Various updates in Akka Scala generator #2472
  • New generator - Scala Play Framework #2421
  • [GRADLE] upgrade to 2.14.1 in java/scala/androit client to fix Vulnerability #2416
  • [scala-httpclient] mark the generator as deprecated #2357

Swift

  • Add auto-generated doc to Swift4 generator #2666
  • Use ObjC reserved words only when objcCompatible is enabled #2632 📕
  • swift4: handle collection params in path #2259
  • [swift4] Use RequestBuilder directly for RxSwift and PromiseKit #1718
  • Mark swift3 generator as deprecated #1675

Typescript

  • [TS][Angular] fix multiple file upload #2735
  • [TypeScript] Generate oneOf schemas as type unions #2647
  • [typescript-fetch] Add free-form object support to TS fetch client generator #2453
  • [TypeScript-Fetch] Generate oneOf schemas as type unions #2617
  • [typescript-axios] Fix Bearer authentication #2578
  • [TypeScript][Node] async promises and imports #2452
  • [typescript-fetch] Guard array mapping against undefined on optional array model properties #2324
  • [typescript-rxjs] add class name as prefix to enum name #2242 📕
  • [typescript-fetch] Support deepObject serialization in query parameters #2234
  • [typescript-angular] Update default Angular version from 4.3 to 7.0 #2117 📒
  • Typescript+Axios: Separate model and api classfiles and package #2005
  • Typescript+Axios: multipart/form-data correctly handled #2002
  • Add bearer authentication support to typescript-angular package #1986
  • Add new generator: typescript-rxjs #1884
  • [TypeScript-Node] support setting the content-type header per-call #1868
  • Add nullable support to typescript-axios #1743
  • Fix discriminator name not following variable naming convention #1742
  • [Typescript-Angular] add nullable support #1730
  • [Typescript][Fetch] client refactoring #569 📕