Skip to content
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

fixed conflict for #266 PR #533

Merged
merged 6 commits into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
* fix for angular version > 7 - typescript version configured
* deleted old mustache files
* fix for missing body parameters in typescript angular
  • Loading branch information
MBcom committed Jan 2, 2019
commit 6dd1dc261ef4e0f56f93def2df9823f114307f57
9 changes: 4 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>5</version>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>3.0.3-MB</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-generators</artifactId>
<version>1.0.3</version>
<packaging>jar</packaging>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public void processOpts() {
additionalProperties.put("injectionToken", ngVersion.atLeast("4.0.0") ? "InjectionToken" : "OpaqueToken");
additionalProperties.put("injectionTokenTyped", ngVersion.atLeast("4.0.0"));
additionalProperties.put("useHttpClient", ngVersion.atLeast("4.3.0"));
additionalProperties.put("useTypescript3", 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 @@ -31,12 +31,13 @@ _without publishing (not recommended):_

```
{{#useNgPackagr}}
npm install PATH_TO_GENERATED_PACKAGE/dist --save
npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save
{{/useNgPackagr}}
{{^useNgPackagr}}
npm install PATH_TO_GENERATED_PACKAGE --save
npm install PATH_TO_GENERATED_PACKAGE/{{npmName}}-{{npmVersion}}.tgz --save
{{/useNgPackagr}}
```
_It's important to take the tgz file, otherwise you'll get trouble with links on windows_

_using `npm link`:_

Expand Down Expand Up @@ -190,4 +191,4 @@ import { environment } from '../environments/environment';
bootstrap: [ AppComponent ]
})
export class AppModule { }
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ export class {{classname}} {

{{/hasFormParams}}
{{#useHttpClient}}
return this.httpClient.{{httpMethod}}{{#isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.basePath}{{{path}}}`,{{#isBodyAllowed}}
{{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}convertFormParamsToString ? formParams.toString() : formParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}}
return this.httpClient.{{httpMethod}}{{#isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.basePath}{{{path}}}`,{{#hasBodyParam}}
{{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}convertFormParamsToString ? formParams.toString() : formParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/hasBodyParam}}
{
{{#hasQueryParams}}
params: queryParameters,
Expand Down Expand Up @@ -337,3 +337,4 @@ export class {{classname}} {

{{/operation}}
{{/operations}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"module": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"build": "ngc",
"postinstall": "npm run build"
"build": "ngc && npm pack"
},
{{/useNgPackagr}}
"peerDependencies": {
Expand All @@ -28,7 +27,7 @@
"@angular/compiler": "^{{ngVersion}}",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
"rxjs": "^5.4.0",
"rxjs": "{{#useRxJS6}}^6.1.0{{/useRxJS6}}{{^useRxJS6}}^5.4.0{{/useRxJS6}}",
"zone.js": "^0.7.6"
},
"devDependencies": {
Expand All @@ -40,9 +39,10 @@
"@angular/platform-browser": "^{{ngVersion}}",{{#useNgPackagr}}
"ng-packagr": {{#useOldNgPackagr}}"^1.6.0"{{/useOldNgPackagr}}{{^useOldNgPackagr}}"^2.4.1"{{/useOldNgPackagr}},{{/useNgPackagr}}
"reflect-metadata": "^0.1.3",
"rxjs": "^5.4.0",
"rxjs": "{{#useRxJS6}}^6.1.0{{/useRxJS6}}{{^useRxJS6}}^5.4.0{{/useRxJS6}}",
"zone.js": "^0.7.6",
"typescript": "^2.1.5"
{{#useTypescript3}} "typescript": ">=3.1.1 <3.2.0"{{/useTypescript3}}
{{^useTypescript3}} "typescript": ">=2.1.5 <2.8"{{/useTypescript3}}
}{{#npmRepository}},{{/npmRepository}}
{{#npmRepository}}
"publishConfig": {
Expand Down
193 changes: 0 additions & 193 deletions src/main/resources/mustache/typescript-angular/README.mustache

This file was deleted.

38 changes: 0 additions & 38 deletions src/main/resources/mustache/typescript-angular/api.module.mustache

This file was deleted.

Loading