-
-
Notifications
You must be signed in to change notification settings - Fork 664
fix(angular): emit filterParams for untagged ops in tags-split default file #3359
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
melloware
merged 22 commits into
orval-labs:master
from
the-ult:fix/3103-filterparams-default-tag
May 17, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
61dec02
fix(angular): emit filterParams helper for untagged ops in tags-split…
df27c8f
refactor(angular): eliminate redundant camel(tag) calls in verb filter
5682cd2
Merge branch 'master' into fix/3103-filterparams-default-tag
the-ult fea40a8
fix(angular): add regression coverage for untagged default services
b8747da
fix(angular): address PR review comments
688b046
fix(core): include paramsFilter in generated targets
baab3d7
fix(core): export angular params filter plumbing
426afc3
fix(orval): normalize paramsFilter overrides
044a684
Merge branch 'master' into fix/3103-filterparams-default-tag
the-ult e1a283f
test(angular): Refresh sample snapshots for paramsFilter
180b194
test(angular-query): Update filterParams snapshots with passthroughKe…
9e79d5e
fix(angular): preserve params filter passthrough in generated params
fd6b0c5
fix(core): Tighten Angular params passthrough
dc0da37
fix(angular): trim 3326 spillover from 3103
e15c376
fix(core): restore 3103 branch validation
b32ceb3
Merge branch 'master' into fix/3103-filterparams-default-tag
the-ult d5841f5
test(snapshots): remove stale generated snapshots
0d4eaf7
fix(angular): apply review follow-ups for default tag bucket
9518ffa
fix: tighten default tag helpers and doc recursion
b719b82
fix(angular): correct default-tag identity check and test housekeeping
0e1c20c
fix(angular): resolve lint errors in utils.test.ts
06d6c79
Merge branch 'master' into fix/3103-filterparams-default-tag
the-ult 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
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 |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| import { | ||
| camel, | ||
| type ClientBuilder, | ||
| type ClientDependenciesBuilder, | ||
| type ClientExtraFilesBuilder, | ||
|
|
@@ -51,6 +50,7 @@ import { | |
| createReturnTypesRegistry, | ||
| createRouteRegistry, | ||
| getDefaultSuccessType, | ||
| getRelevantVerbOptionsForTag, | ||
| getSchemaOutputTypeRef, | ||
| isMutationVerb, | ||
| isPrimitiveType, | ||
|
|
@@ -162,16 +162,6 @@ const resourceReturnTypesRegistry = createReturnTypesRegistry(); | |
| /** @internal Exported for testing only */ | ||
| export const routeRegistry = createRouteRegistry(); | ||
|
|
||
| const getRelevantVerbOptions = ( | ||
| verbOptions: Record<string, GeneratorVerbOptions>, | ||
| tag?: string, | ||
| ): GeneratorVerbOptions[] => | ||
| tag | ||
| ? Object.values(verbOptions).filter((verbOption) => | ||
| verbOption.tags.some((currentTag) => camel(currentTag) === camel(tag)), | ||
| ) | ||
| : Object.values(verbOptions); | ||
|
|
||
| const getVerbOptionsRecord = ( | ||
| verbOptions: readonly GeneratorVerbOptions[], | ||
| ): Record<string, GeneratorVerbOptions> => | ||
|
|
@@ -1227,7 +1217,7 @@ export const generateHttpResourceHeader: ClientHeaderBuilder = ({ | |
| // the shared header duplicates helpers across every tag file and pulls in | ||
| // type names the file-local `imports` filter never sees, producing missing | ||
| // schema imports in the generated output. | ||
| const relevantVerbOptions = getRelevantVerbOptions(verbOptions, tag); | ||
| const relevantVerbOptions = getRelevantVerbOptionsForTag(verbOptions, tag); | ||
|
|
||
| const retrievals = relevantVerbOptions.filter((verbOption) => | ||
| isRetrievalVerb( | ||
|
|
@@ -1616,7 +1606,7 @@ export const generateHttpResourceExtraFiles: ClientExtraFilesBuilder = ( | |
|
|
||
| return Promise.resolve([ | ||
| buildHttpResourceExtraFile( | ||
| getVerbOptionsRecord(getRelevantVerbOptions(verbOptions)), | ||
| getVerbOptionsRecord(getRelevantVerbOptionsForTag(verbOptions)), | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Accepted — extra resource file intentionally includes all operations from all tags in tags-split mode, mirroring the previous behavior. |
||
| getHttpResourceExtraFilePath(output), | ||
| output, | ||
| context, | ||
|
|
||
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,17 @@ | ||
| import type { GeneratorVerbOptions } from '@orval/core'; | ||
|
|
||
| /** | ||
| * Builds a minimal {@link GeneratorVerbOptions.queryParams} object for use in | ||
| * unit tests. Only the fields required by the Angular generators are populated; | ||
| * everything else can be overridden via the `overrides` argument. | ||
| */ | ||
| export const createQueryParams = ( | ||
| overrides: Partial<NonNullable<GeneratorVerbOptions['queryParams']>> = {}, | ||
| ): NonNullable<GeneratorVerbOptions['queryParams']> => ({ | ||
| schema: { name: 'GetPetByIdParams', model: '', imports: [] }, | ||
| deps: [], | ||
| isOptional: true, | ||
| originalSchema: { type: 'object' }, | ||
| requiredNullableKeys: [], | ||
| ...overrides, | ||
| }); |
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.
Accepted — extra files intentionally return all operations and should not filter by tag or default bucket.