Skip to content

Commit

Permalink
Merge branch 'master' into fix/go-decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMario committed Oct 15, 2020
2 parents 645f2ab + 755481e commit b09ab1c
Show file tree
Hide file tree
Showing 83 changed files with 3,062 additions and 3,946 deletions.
17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ before_install:
- gem install bundler -v '< 2'
- gem update --system 2.7.8
- gem --version
# install node version 10.x
- nvm install 10.22.0
- nvm use 10.22.0
# install typescript
- npm install -g typescript
- npm install -g npm
- npm config set registry http:https://registry.npmjs.org/
Expand All @@ -64,7 +68,18 @@ before_install:
- cat /etc/hosts
# show java version
- java -version

# show node version
- node -v
# show node executable
- which node
# show npm version
- npm -v
# show npm executable
- which npm
# show typescript version
- tsc -v
# show tsc executable
- which tsc
install:
# Add Godeps dependencies to GOPATH and PATH
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
Expand Down
71 changes: 37 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/badge/icon?subject=jenkins%20build%20-%20java%207)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/)

- Master (2.4.16-SNAPSHOT): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
- Master (2.4.17-SNAPSHOT): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
[![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-master)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)

- 3.0.22-SNAPSHOT: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
- 3.0.23-SNAPSHOT: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
[![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-3)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=3.0.0&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)

Expand Down Expand Up @@ -52,13 +52,13 @@ dependency example:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.4.15</version>
<version>2.4.16</version>
</dependency>
```

### Swagger Codegen 3.X ([`3.0.0` branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0))

Swagger Codegen 2.X supports OpenAPI version 3 (and version 2 via spec conversion to version 3)
Swagger Codegen 3.X supports OpenAPI version 3 (and version 2 via spec conversion to version 3)
[Online generator of version 3.X](https://github.com/swagger-api/swagger-codegen/tree/3.0.0#online-generators) supports both generation from Swagger/OpenAPI version 2 (by using engine + generators of 2.X) and version 3 specifications.

group id: `io.swagger.codegen.v3`
Expand All @@ -70,7 +70,7 @@ dependency example:
<dependency>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.21</version>
<version>3.0.22</version>
</dependency>
```

Expand Down Expand Up @@ -134,8 +134,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20

Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
-------------------------- | ------------ | -------------------------- | -----
3.0.22-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.22-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
[3.0.21](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.21) (**current stable**) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-codegen/tree/v3.0.21)
3.0.23-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.23-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
[3.0.22](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.22) (**current stable**) | 2020-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.22](https://github.com/swagger-api/swagger-codegen/tree/v3.0.22)
[3.0.21](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.21) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-codegen/tree/v3.0.21)
[3.0.20](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.20) | 2020-05-18 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.20](https://github.com/swagger-api/swagger-codegen/tree/v3.0.20)
[3.0.19](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.19) | 2020-04-02 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.19](https://github.com/swagger-api/swagger-codegen/tree/v3.0.19)
[3.0.18](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.18) | 2020-02-26 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.18](https://github.com/swagger-api/swagger-codegen/tree/v3.0.18)
Expand All @@ -156,8 +157,9 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
[3.0.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.2)| 2018-10-19 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
[3.0.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.1)| 2018-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
[3.0.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0)| 2018-09-06 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
2.4.16-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.16-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
[2.4.15](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.15) (**current stable**) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.15](https://github.com/swagger-api/swagger-codegen/tree/v2.4.15)
2.4.17-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.17-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
[2.4.16](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.16) (**current stable**) | 2020-10-05 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.16](https://github.com/swagger-api/swagger-codegen/tree/v2.4.16)
[2.4.15](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.15) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.15](https://github.com/swagger-api/swagger-codegen/tree/v2.4.15)
[2.4.14](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.14) | 2020-05-18 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.14](https://github.com/swagger-api/swagger-codegen/tree/v2.4.14)
[2.4.13](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.13) | 2020-04-02 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.13](https://github.com/swagger-api/swagger-codegen/tree/v2.4.13)
[2.4.12](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.12) | 2020-01-15 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.12](https://github.com/swagger-api/swagger-codegen/tree/v2.4.12)
Expand Down Expand Up @@ -186,17 +188,17 @@ If you're looking for the latest stable version, you can grab it directly from M

```sh
# Download current stable 2.x.x branch (Swagger and OpenAPI version 2)
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar -O swagger-codegen-cli.jar
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.16/swagger-codegen-cli-2.4.16.jar -O swagger-codegen-cli.jar

java -jar swagger-codegen-cli.jar help

# Download current stable 3.x.x branch (OpenAPI version 3)
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.21/swagger-codegen-cli-3.0.21.jar -O swagger-codegen-cli.jar
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.22/swagger-codegen-cli-3.0.22.jar -O swagger-codegen-cli.jar

java -jar swagger-codegen-cli.jar --help
```

For Windows users, you will need to install [wget](http:https://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. `Invoke-WebRequest -OutFile swagger-codegen-cli.jar https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar`
For Windows users, you will need to install [wget](http:https://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. `Invoke-WebRequest -OutFile swagger-codegen-cli.jar https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.16/swagger-codegen-cli-2.4.16.jar`

On a mac, it's even easier with `brew`:
```sh
Expand Down Expand Up @@ -344,7 +346,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
```
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i https://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)

You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar)
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.16/swagger-codegen-cli-2.4.16.jar)

To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate` (for version 3.x check [3.0.0 branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0))

Expand Down Expand Up @@ -640,10 +642,10 @@ Your config file for Java can look like

```json
{
"groupId":"com.my.company",
"artifactId":"MyClient",
"artifactVersion":"1.2.0",
"library":"feign"
"groupId": "com.my.company",
"artifactId": "MyClient",
"artifactVersion": "1.2.0",
"library": "feign"
}
```

Expand Down Expand Up @@ -779,10 +781,10 @@ curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"https://petst
```
Then you will receive a JSON response with the URL to download the zipped code.

To customize the SDK, you can `POST` to `https://generator.swagger.io/gen/clients/{language}` with the following HTTP body:
To customize the SDK, you can `POST` to `https://generator.swagger.io/api/gen/clients/{language}` with the following HTTP body:
```json
{
"options": {},
"options": {},
"swaggerUrl": "https://petstore.swagger.io/v2/swagger.json"
}
```
Expand All @@ -791,23 +793,23 @@ in which the `options` for a language can be obtained by submitting a `GET` requ
For example, `curl https://generator.swagger.io/api/gen/clients/python` returns
```json
{
"packageName":{
"opt":"packageName",
"description":"python package name (convention: snake_case).",
"type":"string",
"default":"swagger_client"
"packageName": {
"opt": "packageName",
"description": "python package name (convention: snake_case).",
"type": "string",
"default": "swagger_client"
},
"packageVersion":{
"opt":"packageVersion",
"description":"python package version.",
"type":"string",
"default":"1.0.0"
"packageVersion": {
"opt": "packageVersion",
"description": "python package version.",
"type": "string",
"default": "1.0.0"
},
"sortParamsByRequiredFlag":{
"opt":"sortParamsByRequiredFlag",
"description":"Sort method arguments to place required parameters before optional parameters.",
"type":"boolean",
"default":"true"
"sortParamsByRequiredFlag": {
"opt": "sortParamsByRequiredFlag",
"description": "Sort method arguments to place required parameters before optional parameters.",
"type": "boolean",
"default": "true"
}
}
```
Expand Down Expand Up @@ -932,6 +934,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [Mporium](http:https://mporium.com/)
- [Neverfail](https://neverfail.com/)
- [NexCap](http:https://www.nexess-solutions.com/fr/plateforme-iot/)
- [Nitrobox](https://www.nitrobox.com)
- [Norwegian Air Shuttle](https://www.norwegian.com/)
- [NTT DATA](http:https://www.nttdata.com/)
- [nViso](http:https://www.nviso.ch/)
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-codegen-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.4.16-SNAPSHOT</version>
<version>2.4.17-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.4.16-SNAPSHOT</version>
<version>2.4.17-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.4.16-SNAPSHOT</version>
<version>2.4.17-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2762,6 +2762,7 @@ public CodegenParameter fromParameter(Parameter param, Set<String> imports) {
p.isPrimitiveType = cp.isPrimitiveType;
p.isContainer = true;
p.isListContainer = true;
p.uniqueItems = impl.getUniqueItems() == null ? false : impl.getUniqueItems();

// set boolean flag (e.g. isString)
setParameterBooleanFlagWithCodegenProperty(p, cp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public void processOpts() {
additionalProperties.put("injectionTokenTyped", ngVersion.atLeast("4.0.0"));
additionalProperties.put("useHttpClient", ngVersion.atLeast("4.3.0"));
additionalProperties.put("useRxJS6", ngVersion.atLeast("6.0.0"));
additionalProperties.put("genericModuleWithProviders", ngVersion.atLeast("7.0.0"));
if (!ngVersion.atLeast("4.3.0")) {
supportingFiles.add(new SupportingFile("rxjs-operators.mustache", getIndexDirectory(), "rxjs-operators.ts"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
{{#isContainer}}
{{#isXmlWrapped}}
// items.xmlName={{items.xmlName}}
@JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{items.baseName}}{{/items.xmlName}}")
@JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
@JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{baseName}}{{/items.xmlName}}")
{{/isXmlWrapped}}
{{/isContainer}}
{{/withXml}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
Microsoft Visual Studio Solution File, Format Version 12.00

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26114.2
VisualStudioVersion = 15.0.27428.2043
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "{{sourceFolder}}\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{{packageGuid}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU
{{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU
{{packageGuid}}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{{packageGuid}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU
{{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU
{{packageGuid}}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require 'json'
require 'logger'
require 'tempfile'
require 'typhoeus'
require 'uri'
require 'addressable/uri'

module {{moduleName}}
class ApiClient
Expand Down Expand Up @@ -55,7 +55,7 @@ module {{moduleName}}
:message => response.return_message)
else
fail ApiError.new(:code => response.code,
:response_headers => response.headers,
:response_headers => response.headers.to_h,
:response_body => response.body),
response.status_message
end
Expand Down Expand Up @@ -260,7 +260,7 @@ module {{moduleName}}
def build_request_url(path)
# Add leading and trailing slashes to path
path = "/#{path}".gsub(/\/+/, '/')
URI.encode(@config.base_url + path)
Addressable::URI.encode(@config.base_url + path)
end

# Builds the HTTP request body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{> api_info}}
=end

require 'uri'
require 'addressable/uri'

module {{moduleName}}
class Configuration
Expand Down Expand Up @@ -167,7 +167,7 @@ module {{moduleName}}

def base_url
url = "#{scheme}:https://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
URI.encode(url)
Addressable::URI.encode(url)
end

# Gets API key (with prefix if set).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Gem::Specification.new do |s|

s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'

s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { {{classname}} } from './{{importPath}}';
{{/hasMore}}{{/apis}}{{/apiInfo}} ]
})
export class ApiModule {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders{{#genericModuleWithProviders}}<ApiModule>{{/genericModuleWithProviders}} {
return {
ngModule: ApiModule,
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
Expand Down
Loading

0 comments on commit b09ab1c

Please sign in to comment.