-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Add support for Angular v14 #12901
Merged
macjohnny
merged 8 commits into
OpenAPITools:master
from
marinus-suniram:fix_issue_12593
Aug 17, 2022
Merged
Add support for Angular v14 #12901
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c3c6063
Add support for Angular v14
marinus-suniram 6398daf
Review comments
marinus-suniram f9c42eb
Update samples/client/petstore/typescript-angular-v14-provided-in-roo…
macjohnny a51ca84
Update samples/client/petstore/typescript-angular-v14-provided-in-roo…
macjohnny c50ce4c
Update samples/client/petstore/typescript-angular-v14-provided-in-roo…
macjohnny 6dd5e4f
Review comments
marinus-suniram 7529cfe
Merge remote-tracking branch 'origin' into fix_issue_12593
macjohnny 000d1b2
update samples
macjohnny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
generatorName: typescript-angular | ||
outputDir: samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular | ||
additionalProperties: | ||
ngVersion: 14.0.5 | ||
supportsES6: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
samples/client/petstore/typescript-angular-v14-provided-in-root/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
.angular |
111 changes: 111 additions & 0 deletions
111
samples/client/petstore/typescript-angular-v14-provided-in-root/angular.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "tests", | ||
"projects": { | ||
"test-default": { | ||
"root": "tests/default", | ||
"sourceRoot": "tests/default/src", | ||
"projectType": "application", | ||
"prefix": "app", | ||
"schematics": {}, | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"aot": true, | ||
"outputPath": "tests/default/dist", | ||
"index": "tests/default/src/index.html", | ||
"main": "tests/default/src/main.ts", | ||
"polyfills": "tests/default/src/polyfills.ts", | ||
"tsConfig": "tests/default/src/tsconfig.app.json", | ||
"assets": [ | ||
"tests/default/src/favicon.ico", | ||
"tests/default/src/assets" | ||
], | ||
"styles": [ | ||
"tests/default/src/styles.css" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"budgets": [ | ||
{ | ||
"type": "anyComponentStyle", | ||
"maximumWarning": "6kb" | ||
} | ||
], | ||
"fileReplacements": [ | ||
{ | ||
"replace": "tests/default/src/environments/environment.ts", | ||
"with": "tests/default/src/environments/environment.prod.ts" | ||
} | ||
], | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"namedChunks": false, | ||
"aot": true, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true | ||
}, | ||
"development": {} | ||
}, | ||
"defaultConfiguration": "production" | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "test-default:build:production" | ||
}, | ||
"development": { | ||
"browserTarget": "test-default:build:development" | ||
} | ||
}, | ||
"defaultConfiguration": "development" | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "test-default:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "tests/default/src/test.ts", | ||
"polyfills": "tests/default/src/polyfills.ts", | ||
"tsConfig": "tests/default/src/tsconfig.spec.json", | ||
"karmaConfig": "tests/default/src/karma.conf.js", | ||
"styles": [ | ||
"tests/default/src/styles.css" | ||
], | ||
"scripts": [], | ||
"assets": [ | ||
"tests/default/src/favicon.ico", | ||
"tests/default/src/assets" | ||
] | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"tests/default/src/tsconfig.app.json", | ||
"tests/default/src/tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "test-default" | ||
} |
4 changes: 4 additions & 0 deletions
4
samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
wwwroot/*.js | ||
node_modules | ||
typings | ||
dist |
23 changes: 23 additions & 0 deletions
23
...petstore/typescript-angular-v14-provided-in-root/builds/default/.openapi-generator-ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
19 changes: 19 additions & 0 deletions
19
.../petstore/typescript-angular-v14-provided-in-root/builds/default/.openapi-generator/FILES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.gitignore | ||
README.md | ||
api.module.ts | ||
api/api.ts | ||
api/pet.service.ts | ||
api/store.service.ts | ||
api/user.service.ts | ||
configuration.ts | ||
encoder.ts | ||
git_push.sh | ||
index.ts | ||
model/apiResponse.ts | ||
model/category.ts | ||
model/models.ts | ||
model/order.ts | ||
model/pet.ts | ||
model/tag.ts | ||
model/user.ts | ||
variables.ts |
1 change: 1 addition & 0 deletions
1
...etstore/typescript-angular-v14-provided-in-root/builds/default/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.1.0-SNAPSHOT |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to keep only this one, and remove the other configs, since nothing related to oneof or provided-in changes in angular 14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the feedback. I'm happy to remove the test config, but is this not part of Angular 14 regression tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can keep it and delete it for older angular versions if you want. this way, we have less code to review when something changes. and these type of variations are not version-specific.
to enable the build/test to be run as part of the CI, you need to add it here:
openapi-generator/pom.xml
Line 1212 in 186ad25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have removed
bin/configs/typescript-angular-v14-oneOf.yaml
bin/configs/typescript-angular-v14-provided-in-any.yaml
bin/configs/typescript-angular-v14-provided-in-root-with-npm.yaml