-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[Feat][Typescript Angular] Implement deepObject query params (OAS3.0) #21108
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
Merged
macjohnny
merged 18 commits into
OpenAPITools:master
from
filiptc:feature/typescript-angular-deep-object-query-params
May 7, 2025
Merged
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f5aa790
feature: implement deepObject query params as per documentation.
filiptc 696442c
chore: regenerate samples.
filiptc 810f2ad
chore: symplify code (via @joscha)
filiptc b5472b6
chore: regenerate samples
filiptc d2a06dd
test: add integration test for typescript-angular deepObject query pa…
filiptc 1da1551
fix: typo in the integration tests path
filiptc 0b5ac7f
chore: use node v18 for integration tests
filiptc 537263f
chore: make ES6 compliant
filiptc f75ecd4
Merge branch 'master' of github.com:OpenAPITools/openapi-generator in…
filiptc 4ae6fa3
chore: make test name semantically accurate
filiptc 8d2cd3f
chore: regenerate samples
filiptc 71629f8
test: add angular v16 deep-object test
filiptc 0ae6902
chore: delete previous bespoke test for deep objects (uses test intro…
filiptc 4a805e9
chore: restore missing OAS for deep object API tests
filiptc 44961b2
test: move angular deepObject tests to v19 and delete v16 ones
filiptc d553d5d
Merge branch 'master' of github.com:OpenAPITools/openapi-generator in…
filiptc bac300e
test: atomic deepObject test on service rather than integration with …
filiptc 14fd531
chore: clean up superfluous import
filiptc 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 hidden or 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 hidden or 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,11 @@ | ||
| generatorName: typescript-angular | ||
| outputDir: samples/client/others/typescript-angular-deep-object/builds/default | ||
| inputSpec: modules/openapi-generator/src/test/resources/3_0/deep-object-query.yaml | ||
| templateDir: modules/openapi-generator/src/main/resources/typescript-angular | ||
| additionalProperties: | ||
| ngVersion: 19.0.1 | ||
| supportsES6: true | ||
| tsVersion: 5.6.3 | ||
| zonejsVersion: 0.15.0 | ||
| ngPackagrVersion: 19.0.1 | ||
| rxjsVersion: 6.5.3 |
This file contains hidden or 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 hidden or 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 hidden or 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
49 changes: 49 additions & 0 deletions
49
modules/openapi-generator/src/test/resources/3_0/deep-object-query.yaml
This file contains hidden or 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,49 @@ | ||
| openapi: 3.0.0 | ||
| info: | ||
| title: deepobject-query | ||
| version: 1.0.0 | ||
| paths: | ||
| /car: | ||
| get: | ||
| operationId: getCars | ||
| parameters: | ||
| - name: filter | ||
| in: query | ||
| required: false | ||
| style: deepObject | ||
| schema: | ||
| $ref: '#/components/schemas/CarFilter' | ||
| explode: true | ||
| responses: | ||
| '200': | ||
| description: OK | ||
| content: | ||
| text/plain: | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: '#/components/schemas/Car' | ||
| components: | ||
| schemas: | ||
| Car: | ||
| type: object | ||
| properties: | ||
| id: | ||
| type: integer | ||
| format: int64 | ||
| example: 1 | ||
| make: | ||
| type: string | ||
| example: Toyota | ||
| model: | ||
| type: string | ||
| example: Camry | ||
| CarFilter: | ||
| type: object | ||
| properties: | ||
| make: | ||
| type: string | ||
| example: Toyota | ||
| model: | ||
| type: string | ||
| example: Camry |
42 changes: 42 additions & 0 deletions
42
samples/client/others/typescript-angular-deep-object/.gitignore
This file contains hidden or 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,42 @@ | ||
| # See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. | ||
|
|
||
| # Compiled output | ||
| /dist | ||
| /tmp | ||
| /out-tsc | ||
| /bazel-out | ||
|
|
||
| # Node | ||
| /node_modules | ||
| npm-debug.log | ||
| yarn-error.log | ||
|
|
||
| # IDEs and editors | ||
| .idea/ | ||
| .project | ||
| .classpath | ||
| .c9/ | ||
| *.launch | ||
| .settings/ | ||
| *.sublime-workspace | ||
|
|
||
| # Visual Studio Code | ||
| .vscode/* | ||
| !.vscode/settings.json | ||
| !.vscode/tasks.json | ||
| !.vscode/launch.json | ||
| !.vscode/extensions.json | ||
| .history/* | ||
|
|
||
| # Miscellaneous | ||
| /.angular/cache | ||
| .sass-cache/ | ||
| /connect.lock | ||
| /coverage | ||
| /libpeerconnection.log | ||
| testem.log | ||
| /typings | ||
|
|
||
| # System files | ||
| .DS_Store | ||
| Thumbs.db |
96 changes: 96 additions & 0 deletions
96
samples/client/others/typescript-angular-deep-object/angular.json
This file contains hidden or 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,96 @@ | ||
| { | ||
| "$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
| "version": 1, | ||
| "newProjectRoot": "projects", | ||
| "projects": { | ||
| "typescript-angular-deep-object-tests": { | ||
| "projectType": "application", | ||
| "schematics": {}, | ||
| "root": "", | ||
| "sourceRoot": "src", | ||
| "prefix": "app", | ||
| "architect": { | ||
| "build": { | ||
| "builder": "@angular-devkit/build-angular:application", | ||
| "options": { | ||
| "outputPath": "dist/typescript-angular-deep-object-tests", | ||
| "index": "src/index.html", | ||
| "browser": "src/main.ts", | ||
| "polyfills": [ | ||
| "zone.js" | ||
| ], | ||
| "tsConfig": "tsconfig.app.json", | ||
| "assets": [ | ||
| { | ||
| "glob": "**/*", | ||
| "input": "public" | ||
| } | ||
| ], | ||
| "styles": [ | ||
| "src/styles.css" | ||
| ], | ||
| "scripts": [] | ||
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "budgets": [ | ||
| { | ||
| "type": "initial", | ||
| "maximumWarning": "500kB", | ||
| "maximumError": "1MB" | ||
| }, | ||
| { | ||
| "type": "anyComponentStyle", | ||
| "maximumWarning": "4kB", | ||
| "maximumError": "8kB" | ||
| } | ||
| ], | ||
| "outputHashing": "all" | ||
| }, | ||
| "development": { | ||
| "optimization": false, | ||
| "extractLicenses": false, | ||
| "sourceMap": true | ||
| } | ||
| }, | ||
| "defaultConfiguration": "production" | ||
| }, | ||
| "serve": { | ||
| "builder": "@angular-devkit/build-angular:dev-server", | ||
| "configurations": { | ||
| "production": { | ||
| "buildTarget": "typescript-angular-deep-object-tests:build:production" | ||
| }, | ||
| "development": { | ||
| "buildTarget": "typescript-angular-deep-object-tests:build:development" | ||
| } | ||
| }, | ||
| "defaultConfiguration": "development" | ||
| }, | ||
| "extract-i18n": { | ||
| "builder": "@angular-devkit/build-angular:extract-i18n" | ||
| }, | ||
| "test": { | ||
| "builder": "@angular-devkit/build-angular:karma", | ||
| "options": { | ||
| "polyfills": [ | ||
| "zone.js", | ||
| "zone.js/testing" | ||
| ], | ||
| "tsConfig": "tsconfig.spec.json", | ||
| "assets": [ | ||
| { | ||
| "glob": "**/*", | ||
| "input": "public" | ||
| } | ||
| ], | ||
| "styles": [ | ||
| "src/styles.css" | ||
| ], | ||
| "scripts": [] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
samples/client/others/typescript-angular-deep-object/builds/default/.gitignore
This file contains hidden or 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
...les/client/others/typescript-angular-deep-object/builds/default/.openapi-generator-ignore
This file contains hidden or 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 |
15 changes: 15 additions & 0 deletions
15
samples/client/others/typescript-angular-deep-object/builds/default/.openapi-generator/FILES
This file contains hidden or 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,15 @@ | ||
| .gitignore | ||
| README.md | ||
| api.base.service.ts | ||
| api.module.ts | ||
| api/api.ts | ||
| api/default.service.ts | ||
| configuration.ts | ||
| encoder.ts | ||
| git_push.sh | ||
| index.ts | ||
| model/car.ts | ||
| model/carFilter.ts | ||
| model/models.ts | ||
| param.ts | ||
| variables.ts |
1 change: 1 addition & 0 deletions
1
...es/client/others/typescript-angular-deep-object/builds/default/.openapi-generator/VERSION
This file contains hidden or 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.13.0-SNAPSHOT |
Oops, something went wrong.
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.
Increased Node version as tests were failing due to Angular refusing to compile on NodeJS versions <18. Node 18 is required for all currently supported Angular versions (docs).