-
Notifications
You must be signed in to change notification settings - Fork 7
✨ 619 feature client openapi generation #1050
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
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughAdds OpenAPI Generator configs and scripts, excludes generated API folders from linters/formatters, and adds generated TypeScript OpenAPI clients, models, and runtime artifacts for refarch-frontend and refarch-webcomponent. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
refarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts
Fixed
Show fixed
Hide fixed
refarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts
Fixed
Show fixed
Hide fixed
refarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts
Fixed
Show fixed
Hide fixed
…tion # Conflicts: # refarch-frontend/package-lock.json # refarch-frontend/package.json
refarch-frontend/src/api/refarch-backend/apis/ActuatorApi.ts
Dismissed
Show dismissed
Hide dismissed
| import { | ||
| PagedModelTheEntityResponseDTOFromJSON, | ||
| PagedModelTheEntityResponseDTOToJSON, | ||
| TheEntityRequestDTOFromJSON, | ||
| TheEntityRequestDTOToJSON, | ||
| TheEntityResponseDTOFromJSON, | ||
| TheEntityResponseDTOToJSON, | ||
| } from '../models/index'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
In general, the way to fix unused import warnings is to remove the specific imported symbols that are never referenced in the file, while keeping any that are actually used. We should not remove the entire import statement if some of its members are used elsewhere.
In refarch-frontend/src/api/refarch-backend/apis/TheEntityControllerApi.ts, we need to update the named import block on lines 22–29. According to CodeQL, PagedModelTheEntityResponseDTOToJSON, TheEntityRequestDTOFromJSON, and TheEntityResponseDTOToJSON are unused. We will keep only the symbols that might be used (PagedModelTheEntityResponseDTOFromJSON, TheEntityRequestDTOToJSON, and TheEntityResponseDTOFromJSON) and delete the unused ones from that import list. No other code changes or new imports are required.
| @@ -21,11 +21,8 @@ | ||
| } from '../models/index'; | ||
| import { | ||
| PagedModelTheEntityResponseDTOFromJSON, | ||
| PagedModelTheEntityResponseDTOToJSON, | ||
| TheEntityRequestDTOFromJSON, | ||
| TheEntityRequestDTOToJSON, | ||
| TheEntityResponseDTOFromJSON, | ||
| TheEntityResponseDTOToJSON, | ||
| } from '../models/index'; | ||
|
|
||
| export interface DeleteTheEntityRequest { |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, unused imports should be removed to keep the code clear and avoid confusion about dependencies. Since mapValues is not referenced anywhere in Link.ts, the best fix is simply to delete the import line that brings mapValues into scope.
Concretely, in refarch-frontend/src/api/refarch-backend/models/Link.ts, remove line 15 (import { mapValues } from '../runtime';). No additional methods, imports, or definitions are needed, and no other lines need to be changed. This will eliminate the unused import without affecting any existing functionality.
| @@ -12,7 +12,6 @@ | ||
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; | ||
| /** | ||
| * | ||
| * @export |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, the correct fix for an unused import is to remove the import statement (or the unused symbol from a multi-symbol import) so that all imported identifiers are actually used. This reduces noise, avoids confusion, and can slightly improve build performance.
For this specific file (refarch-frontend/src/api/refarch-backend/models/PageMetadata.ts), the best fix is to delete the single unused import line import { mapValues } from '../runtime'; at line 15. No other code in this file refers to mapValues, so there is no need to add alternative logic or replace it with anything else. The rest of the file remains unchanged. No new methods, imports, or definitions are required.
| @@ -12,7 +12,6 @@ | ||
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; | ||
| /** | ||
| * | ||
| * @export |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, to fix an unused import you remove the import statement if the symbol is truly unused, or start using the imported symbol if it was intended to be used. Here, none of the functions or interfaces reference mapValues, and there is no indication it should be used, so the safest and simplest fix is to remove the mapValues import line.
Concretely, in refarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts, delete line 15 (import { mapValues } from '../runtime';). No additional methods, imports, or definitions are needed; existing functionality for JSON/typed conversion remains unchanged.
| @@ -12,7 +12,6 @@ | ||
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; | ||
| import type { PageMetadata } from './PageMetadata'; | ||
| import { | ||
| PageMetadataFromJSON, |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, unused imports should be removed from the file where they are declared. This eliminates dead code, avoids confusion, and can slightly improve build performance.
The best fix here is to delete the unused mapValues import on line 15 of refarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts. No other code changes are needed because mapValues is not referenced anywhere else in the file. The rest of the imports (PageMetadata, TheEntityResponseDTO, and their JSON helper functions) are used and should remain intact. No new methods, imports, or definitions are required.
| @@ -12,7 +12,6 @@ | ||
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; | ||
| import type { PageMetadata } from './PageMetadata'; | ||
| import { | ||
| PageMetadataFromJSON, |
| import { | ||
| PageMetadataFromJSON, | ||
| PageMetadataFromJSONTyped, | ||
| PageMetadataToJSON, | ||
| PageMetadataToJSONTyped, | ||
| } from './PageMetadata'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, unused imports should be removed from the file to avoid dead code and improve readability. Here, we should adjust the PageMetadata import so that it only brings in the symbols actually used in this file.
Concretely, in refarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts, modify the named import from './PageMetadata' on lines 17–22 to remove PageMetadataFromJSONTyped and PageMetadataToJSONTyped. Keep PageMetadataFromJSON and PageMetadataToJSON as they are required by the JSON conversion functions. No other parts of the file need to change, and no new imports or helper methods are required.
| @@ -16,9 +16,7 @@ | ||
| import type { PageMetadata } from './PageMetadata'; | ||
| import { | ||
| PageMetadataFromJSON, | ||
| PageMetadataFromJSONTyped, | ||
| PageMetadataToJSON, | ||
| PageMetadataToJSONTyped, | ||
| } from './PageMetadata'; | ||
| import type { TheEntityResponseDTO } from './TheEntityResponseDTO'; | ||
| import { |
| import { | ||
| TheEntityResponseDTOFromJSON, | ||
| TheEntityResponseDTOFromJSONTyped, | ||
| TheEntityResponseDTOToJSON, | ||
| TheEntityResponseDTOToJSONTyped, | ||
| } from './TheEntityResponseDTO'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, unused imports should be removed so that only actually referenced symbols are imported. This improves readability and avoids confusion about which functions are in use.
The best fix here is to adjust the import from ./TheEntityResponseDTO to only include the two functions that are used: TheEntityResponseDTOFromJSON and TheEntityResponseDTOToJSON. Specifically, in refarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts, lines 24–29, we should remove TheEntityResponseDTOFromJSONTyped and TheEntityResponseDTOToJSONTyped from the import list. No other code changes or new imports are required, since the rest of the file already works with the non-typed versions, and existing functionality will remain unchanged.
| @@ -23,9 +23,7 @@ | ||
| import type { TheEntityResponseDTO } from './TheEntityResponseDTO'; | ||
| import { | ||
| TheEntityResponseDTOFromJSON, | ||
| TheEntityResponseDTOFromJSONTyped, | ||
| TheEntityResponseDTOToJSON, | ||
| TheEntityResponseDTOToJSONTyped, | ||
| } from './TheEntityResponseDTO'; | ||
|
|
||
| /** |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
To fix the problem, we should remove the unused mapValues import from this file. This directly addresses the static analysis finding without altering any runtime behavior, because mapValues is never referenced.
Concretely:
- In
refarch-webcomponent/src/api/refarch-backend/models/TheEntityRequestDTO.ts, delete line 15:import { mapValues } from '../runtime';. - No other changes are required: no new imports, methods, or definitions are needed, and the existing serialization/deserialization functions continue to work as before.
| @@ -12,7 +12,6 @@ | ||
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; | ||
| /** | ||
| * | ||
| * @export |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, to fix an unused import, you remove the import statement if the symbol is not used anywhere in the file. This simplifies the code and avoids confusion.
Here, the best fix is to delete the mapValues import on line 15 of refarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.ts. No other code changes are required because nothing in this file references mapValues, and there are no dependent types or functions tied to that import. No new methods, imports, or definitions are needed.
| @@ -12,7 +12,6 @@ | ||
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { mapValues } from '../runtime'; | ||
| /** | ||
| * | ||
| * @export |
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.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@refarch-frontend/openapitools.json`:
- Around line 1-19: The additionalProperties block in openapitools.json contains
an unsupported property "typescriptThreePlus" for the "typescript-fetch"
generator; remove "typescriptThreePlus": true from the additionalProperties
object and (optionally) add "withInterfaces": true to improve type separation,
and consider bumping "generator-cli" version from "7.13.0" to a newer release
(e.g., "7.18.0") to pick up fixes; update the JSON so additionalProperties only
contains supported keys ("supportsES6", "enumPropertyNaming", and optionally
"withInterfaces") while leaving "generatorName": "typescript-fetch" unchanged.
In `@refarch-frontend/package.json`:
- Line 46: DevDependencies in package.json are not alphabetically ordered: move
the "@openapitools/openapi-generator-cli" entry so it appears after
"@muenchen/..." and before the "@vue/..." entries; update the devDependencies
block to place "@openapitools/openapi-generator-cli": "2.27.0" in that correct
alphabetical position (keeping the version unchanged) to maintain the requested
ordering convention.
In `@refarch-webcomponent/src/api/refarch-backend/runtime.ts`:
- Around line 244-249: The method clone<T extends BaseAPI>(this: T) defines a
local variable named constructor which shadows the global name; rename that
local variable (e.g., to ctor or apiCtor) and update its usages inside the
method (in the line that instantiates new constructor(this.configuration)) to
eliminate the shadowing, or if you prefer not to change generated code, add
runtime.ts to the Biome ignore list or adjust the OpenAPI Generator template to
emit a different variable name.
In `@stack/openapitools.json`:
- Around line 4-6: Update the stack-level OpenAPI Generator CLI version to match
the repo: in stack/openapitools.json change the "generator-cli" -> "version"
value from "7.9.0" to "7.13.0" so it aligns with refarch-frontend and
refarch-webcomponent and ensures consistent generated code and types across the
codebase.
♻️ Duplicate comments (14)
refarch-frontend/src/api/refarch-backend/models/Link.ts (1)
15-15: Unused import in generated code.The
mapValuesimport is unused in this file, as flagged by CodeQL. Since this is auto-generated code (with lint rules disabled at lines 1-2), manual fixes would be overwritten on regeneration. This is a known quirk of the OpenAPI Generator for simple models that don't require the utility.The generated code is correctly excluded from linting via
.eslintignoreper the PR description, so this won't cause CI failures.refarch-webcomponent/src/api/refarch-backend/models/Link.ts (1)
15-15: Unused importmapValuesin generated code.This is a known OpenAPI Generator behavior—it imports utility functions regardless of whether the model uses them. Since this file is auto-generated and marked "Do not edit," consider addressing this at the generator level via a custom template or post-generation script if the unused imports cause issues.
refarch-webcomponent/src/api/refarch-backend/models/TheEntityRequestDTO.ts (1)
15-15: Unused importmapValuesin generated code.Same issue as other generated model files. This is an OpenAPI Generator quirk that should be addressed at the generator configuration level if needed.
refarch-webcomponent/src/api/refarch-backend/apis/ActuatorApi.ts (1)
17-23: Unused importsLinkFromJSONandLinkToJSONin generated code.The
Linktype (line 18) is used in the return type oflinksRaw/linksmethods, but the JSON serialization utilities are not called because the response is a nested map structure returned as-is. This is an OpenAPI Generator limitation.refarch-frontend/src/api/refarch-backend/apis/ActuatorApi.ts (1)
20-23: Unused imports detected by static analysis.
LinkFromJSONandLinkToJSONare imported but never used. This is a common artifact of OpenAPI Generator when the generated code doesn't require serialization helpers for all imported types.Since this is auto-generated code, consider configuring the generator to avoid unused imports, or ensure these files remain in
.eslintignoreas the PR already does.refarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.ts (1)
15-15: UnusedmapValuesimport.The
mapValuesimport is not used in this file. This is a common OpenAPI Generator artifact where the runtime utility is imported but not needed for simple DTOs without nested object mappings.Since this is auto-generated code with linting disabled, this is acceptable.
refarch-webcomponent/src/api/refarch-backend/models/PageMetadata.ts (1)
15-15: Unused importmapValuesin auto-generated code.This is a known quirk of the OpenAPI Generator where imports may be included but not used depending on the model structure. Since this file is auto-generated (as noted in the header), manual fixes would be overwritten on regeneration.
The generated files are already excluded from ESLint via the ignore configuration added in this PR, so this won't cause CI failures.
refarch-frontend/src/api/refarch-backend/models/TheEntityResponseDTO.ts (1)
1-72: Auto-generated OpenAPI client code looks correct.This file is auto-generated by OpenAPI Generator with appropriate header comments and disabled lint rules. The interface definition, type guard, and JSON serialization helpers follow the standard OpenAPI Generator typescript-fetch template patterns. Since the generated folder is added to prettierignore/eslint-ignore as noted in the PR, the unused
mapValuesimport flagged by static analysis is expected and acceptable.refarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts (1)
1-87: Auto-generated paged model with correct serialization logic.The interface and JSON (de)serialization helpers correctly handle the nested
contentarray andpagemetadata using the appropriate helper functions. The unused imports (mapValues,*FromJSONTyped,*ToJSONTyped) are a known artifact of the OpenAPI Generator template and have already been flagged in past review comments.refarch-frontend/src/api/refarch-backend/models/PageMetadata.ts (1)
1-88: LGTM!Standard auto-generated pagination metadata model with correct interface definition and JSON serialization helpers. The unused
mapValuesimport is a known OpenAPI Generator artifact already flagged in past review comments.refarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts (1)
1-87: Auto-generated paged model structure is correct.This file mirrors the refarch-webcomponent counterpart with identical structure. The interface and serialization helpers correctly map nested
contentandpagefields. All unused import warnings from static analysis have already been flagged in past review comments (multiple times).refarch-frontend/src/api/refarch-backend/apis/TheEntityControllerApi.ts (1)
22-29: Unused imports are a known generator artifact.The static analysis correctly identifies that
PagedModelTheEntityResponseDTOToJSON,TheEntityRequestDTOFromJSON, andTheEntityResponseDTOToJSONare unused. This is expected behavior from OpenAPI Generator—it imports both serialization directions for each model even when only one is needed (FromJSON for response parsing, ToJSON for request serialization).Since these are generated files that should not be manually edited, this is acceptable. If cleaner output is desired, consider customizing the generator templates or exploring generator options that support tree-shaking.
refarch-frontend/src/api/refarch-backend/models/TheEntityRequestDTO.ts (1)
15-15: UnusedmapValuesimport is a generator artifact.This import is included by the OpenAPI Generator template but isn't used for this simple DTO. Since this is generated code that shouldn't be manually edited, this is acceptable.
refarch-webcomponent/src/api/refarch-backend/apis/TheEntityControllerApi.ts (1)
1-29: Webcomponent API client mirrors frontend version.This is the expected duplicate of the generated API client for the webcomponent module. The same observations apply: standard OpenAPI Generator output with the known unused imports artifact already flagged by static analysis.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (2)
refarch-frontend/package-lock.jsonis excluded by!**/package-lock.jsonrefarch-webcomponent/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (37)
refarch-frontend/.prettierignorerefarch-frontend/eslint.config.jsrefarch-frontend/openapitools.jsonrefarch-frontend/package.jsonrefarch-frontend/src/api/refarch-backend/.openapi-generator-ignorerefarch-frontend/src/api/refarch-backend/.openapi-generator/FILESrefarch-frontend/src/api/refarch-backend/.openapi-generator/VERSIONrefarch-frontend/src/api/refarch-backend/apis/ActuatorApi.tsrefarch-frontend/src/api/refarch-backend/apis/TheEntityControllerApi.tsrefarch-frontend/src/api/refarch-backend/apis/index.tsrefarch-frontend/src/api/refarch-backend/index.tsrefarch-frontend/src/api/refarch-backend/models/Link.tsrefarch-frontend/src/api/refarch-backend/models/PageMetadata.tsrefarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.tsrefarch-frontend/src/api/refarch-backend/models/TheEntityRequestDTO.tsrefarch-frontend/src/api/refarch-backend/models/TheEntityResponseDTO.tsrefarch-frontend/src/api/refarch-backend/models/index.tsrefarch-frontend/src/api/refarch-backend/runtime.tsrefarch-webcomponent/.prettierignorerefarch-webcomponent/eslint.config.jsrefarch-webcomponent/openapitools.jsonrefarch-webcomponent/package.jsonrefarch-webcomponent/src/api/refarch-backend/.openapi-generator-ignorerefarch-webcomponent/src/api/refarch-backend/.openapi-generator/FILESrefarch-webcomponent/src/api/refarch-backend/.openapi-generator/VERSIONrefarch-webcomponent/src/api/refarch-backend/apis/ActuatorApi.tsrefarch-webcomponent/src/api/refarch-backend/apis/TheEntityControllerApi.tsrefarch-webcomponent/src/api/refarch-backend/apis/index.tsrefarch-webcomponent/src/api/refarch-backend/index.tsrefarch-webcomponent/src/api/refarch-backend/models/Link.tsrefarch-webcomponent/src/api/refarch-backend/models/PageMetadata.tsrefarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.tsrefarch-webcomponent/src/api/refarch-backend/models/TheEntityRequestDTO.tsrefarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.tsrefarch-webcomponent/src/api/refarch-backend/models/index.tsrefarch-webcomponent/src/api/refarch-backend/runtime.tsstack/openapitools.json
🧰 Additional context used
🧬 Code graph analysis (9)
refarch-webcomponent/src/api/refarch-backend/models/PageMetadata.ts (1)
refarch-webcomponent/src/api/refarch-backend/runtime.ts (4)
value(405-407)value(413-415)value(421-423)value(429-431)
refarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts (3)
refarch-frontend/src/api/refarch-backend/models/TheEntityResponseDTO.ts (3)
TheEntityResponseDTO(21-34)TheEntityResponseDTOFromJSON(43-45)TheEntityResponseDTOToJSON(58-60)refarch-frontend/src/api/refarch-backend/models/PageMetadata.ts (3)
PageMetadata(21-46)PageMetadataFromJSON(55-57)PageMetadataToJSON(72-74)refarch-frontend/src/api/refarch-backend/runtime.ts (4)
value(405-407)value(413-415)value(421-423)value(429-431)
refarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts (3)
refarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.ts (3)
TheEntityResponseDTO(21-34)TheEntityResponseDTOFromJSON(43-45)TheEntityResponseDTOToJSON(58-60)refarch-webcomponent/src/api/refarch-backend/models/PageMetadata.ts (3)
PageMetadata(21-46)PageMetadataFromJSON(55-57)PageMetadataToJSON(72-74)refarch-webcomponent/src/api/refarch-backend/runtime.ts (4)
value(405-407)value(413-415)value(421-423)value(429-431)
refarch-webcomponent/src/api/refarch-backend/models/Link.ts (1)
refarch-webcomponent/src/api/refarch-backend/runtime.ts (4)
value(405-407)value(413-415)value(421-423)value(429-431)
refarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.ts (1)
refarch-webcomponent/src/api/refarch-backend/runtime.ts (4)
value(405-407)value(413-415)value(421-423)value(429-431)
refarch-webcomponent/src/api/refarch-backend/apis/TheEntityControllerApi.ts (4)
refarch-webcomponent/src/api/refarch-backend/models/TheEntityRequestDTO.ts (2)
TheEntityRequestDTO(21-28)TheEntityRequestDTOToJSON(52-54)refarch-webcomponent/src/api/refarch-backend/runtime.ts (3)
InitOverrideFunction(298-298)ApiResponse(393-396)HTTPHeaders(292-292)refarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts (2)
PagedModelTheEntityResponseDTO(36-49)PagedModelTheEntityResponseDTOFromJSON(58-60)refarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.ts (2)
TheEntityResponseDTO(21-34)TheEntityResponseDTOFromJSON(43-45)
refarch-webcomponent/src/api/refarch-backend/apis/ActuatorApi.ts (2)
refarch-webcomponent/src/api/refarch-backend/runtime.ts (3)
InitOverrideFunction(298-298)ApiResponse(393-396)HTTPHeaders(292-292)refarch-webcomponent/src/api/refarch-backend/models/Link.ts (1)
Link(21-34)
refarch-frontend/src/api/refarch-backend/models/TheEntityRequestDTO.ts (1)
refarch-frontend/src/api/refarch-backend/runtime.ts (4)
value(405-407)value(413-415)value(421-423)value(429-431)
refarch-frontend/src/api/refarch-backend/models/Link.ts (1)
refarch-frontend/src/api/refarch-backend/runtime.ts (4)
value(405-407)value(413-415)value(421-423)value(429-431)
🪛 Biome (2.1.2)
refarch-webcomponent/src/api/refarch-backend/runtime.ts
[error] 245-245: Do not shadow the global "constructor" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
refarch-frontend/src/api/refarch-backend/runtime.ts
[error] 245-245: Do not shadow the global "constructor" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
🪛 GitHub Check: CodeQL
refarch-frontend/src/api/refarch-backend/models/PageMetadata.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
refarch-webcomponent/src/api/refarch-backend/models/PageMetadata.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
refarch-frontend/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
[notice] 17-22: Unused variable, import, function or class
Unused imports PageMetadataFromJSONTyped, PageMetadataToJSONTyped.
[notice] 24-29: Unused variable, import, function or class
Unused imports TheEntityResponseDTOFromJSONTyped, TheEntityResponseDTOToJSONTyped.
refarch-webcomponent/src/api/refarch-backend/models/PagedModelTheEntityResponseDTO.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
[notice] 17-22: Unused variable, import, function or class
Unused imports PageMetadataFromJSONTyped, PageMetadataToJSONTyped.
[notice] 24-29: Unused variable, import, function or class
Unused imports TheEntityResponseDTOFromJSONTyped, TheEntityResponseDTOToJSONTyped.
refarch-webcomponent/src/api/refarch-backend/models/TheEntityRequestDTO.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
refarch-webcomponent/src/api/refarch-backend/models/Link.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
refarch-frontend/src/api/refarch-backend/apis/TheEntityControllerApi.ts
[notice] 22-29: Unused variable, import, function or class
Unused imports PagedModelTheEntityResponseDTOToJSON, TheEntityRequestDTOFromJSON, TheEntityResponseDTOToJSON.
refarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
refarch-frontend/src/api/refarch-backend/models/TheEntityResponseDTO.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
refarch-webcomponent/src/api/refarch-backend/apis/TheEntityControllerApi.ts
[notice] 22-29: Unused variable, import, function or class
Unused imports PagedModelTheEntityResponseDTOToJSON, TheEntityRequestDTOFromJSON, TheEntityResponseDTOToJSON.
refarch-webcomponent/src/api/refarch-backend/apis/ActuatorApi.ts
[notice] 20-23: Unused variable, import, function or class
Unused imports LinkFromJSON, LinkToJSON.
refarch-frontend/src/api/refarch-backend/apis/ActuatorApi.ts
[notice] 20-23: Unused variable, import, function or class
Unused imports LinkFromJSON, LinkToJSON.
refarch-frontend/src/api/refarch-backend/models/TheEntityRequestDTO.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
refarch-frontend/src/api/refarch-backend/models/Link.ts
[notice] 15-15: Unused variable, import, function or class
Unused import mapValues.
🔇 Additional comments (38)
refarch-webcomponent/.prettierignore (1)
3-6: LGTM!The ignore pattern
src/api/*/correctly excludes generated API client folders from Prettier formatting. The comment clarifies the intent, which aids maintainability.refarch-webcomponent/eslint.config.js (1)
32-32: LGTM!The glob pattern
src/api/*/**correctly excludes all generated API client files from ESLint. The syntax appropriately differs from the.prettierignorepattern (src/api/*/) since ESLint uses glob patterns while prettierignore uses gitignore syntax—both achieve the intended exclusion.refarch-frontend/eslint.config.js (1)
46-46: LGTM!The glob pattern correctly excludes generated OpenAPI client code from linting. Ignoring auto-generated code is appropriate since it may not conform to project-specific ESLint rules and shouldn't be manually modified.
refarch-frontend/package.json (1)
16-17: LGTM! The API generation script is correctly configured.The
api-genscript properly delegates to the OpenAPI Generator CLI, which will read configuration from theopenapitools.jsonfile.refarch-frontend/.prettierignore (1)
2-5: LGTM! Generated API folders are correctly excluded from Prettier.The pattern
src/api/*/appropriately excludes generated OpenAPI client code from formatting checks.Minor note:
node_modulesis ignored by Prettier by default, so explicitly listing it is redundant but harmless.refarch-frontend/src/api/refarch-backend/.openapi-generator/VERSION (1)
1-1: Standard generated metadata file.This VERSION file is automatically created by OpenAPI Generator to track which version was used for code generation. It's correctly committed to ensure reproducibility.
refarch-webcomponent/src/api/refarch-backend/.openapi-generator-ignore (1)
1-23: Standard OpenAPI Generator ignore template.This is the default
.openapi-generator-ignoretemplate that allows developers to exclude specific files from being overwritten during regeneration. No active ignore rules are present, which is appropriate for initial setup.refarch-webcomponent/package.json (2)
17-18: LGTM! Consistent withrefarch-frontendconfiguration.The
api-genscript is correctly configured and mirrors the setup inrefarch-frontend, ensuring a consistent developer experience across both projects.
39-39: Dependency version is consistent across packages.Good practice to use the same
@openapitools/openapi-generator-cliversion (2.27.0) in bothrefarch-frontendandrefarch-webcomponentto ensure consistent code generation output.refarch-webcomponent/src/api/refarch-backend/.openapi-generator/VERSION (1)
1-1: LGTM!Auto-generated version marker file. Version
7.13.0is consistent with the configuration inopenapitools.json.refarch-frontend/src/api/refarch-backend/.openapi-generator-ignore (1)
1-23: LGTM!Standard OpenAPI Generator ignore file template. All patterns are commented out, meaning all generated files will be regenerated on each run. This is appropriate for the initial setup.
refarch-frontend/src/api/refarch-backend/.openapi-generator/FILES (1)
1-12: LGTM!Auto-generated manifest file listing all generated artifacts. The file structure follows the standard
typescript-fetchgenerator output with proper barrel files for APIs and models.refarch-frontend/src/api/refarch-backend/models/Link.ts (1)
1-72: Generated model file looks correct.The
Linkinterface and its JSON serialization helpers follow the standard OpenAPI Generatortypescript-fetchtemplate. The null/undefined guards inLinkFromJSONTypedandLinkToJSONTypedare appropriate for handling optional fields.refarch-webcomponent/openapitools.json (1)
1-19: Configuration is correct for OpenAPI Generator CLI.The setup appropriately uses
typescript-fetchgenerator with ES6 support and TypeScript 3+ compatibility. The glob pattern expects the OpenAPI spec to be generated by the backend build process in../refarch-backend/target/*.yaml. Version 7.13.0 is a stable release; if you want to stay more current, v7.18.0 is available as the latest version.refarch-webcomponent/src/api/refarch-backend/models/Link.ts (1)
21-72: Auto-generated model implementation looks correct.The
Linkinterface and its serialization helpers follow standard OpenAPI Generator patterns. TheinstanceOfLinktype guard correctly returnstruesince all properties are optional.refarch-webcomponent/src/api/refarch-backend/models/TheEntityRequestDTO.ts (1)
21-65: Auto-generated DTO implementation looks correct.The
TheEntityRequestDTOinterface correctly markstextAttributeas required, and the type guard at lines 33-36 properly validates its presence. Serialization helpers are implemented correctly.refarch-webcomponent/src/api/refarch-backend/.openapi-generator/FILES (1)
1-12: OpenAPI Generator manifest file.Standard tracking file listing all generated artifacts. This helps with regeneration and understanding the generated structure.
refarch-webcomponent/src/api/refarch-backend/runtime.ts (2)
16-16: Hardcoded localhost BASE_PATH in generated code.The default
BASE_PATHpoints to a development server. This is acceptable since theConfigurationclass allows runtime override viabasePathparameter. Ensure consumers configure the appropriate base URL for their environment.
31-432: Runtime infrastructure implementation is well-structured.The generated runtime provides a solid foundation:
- Configurable middleware pipeline (pre/post/onError hooks)
- Proper error handling with typed error classes
- Flexible request/response handling with JSON, Blob, Text support
- Query string serialization with nested object support
refarch-webcomponent/src/api/refarch-backend/apis/ActuatorApi.ts (2)
37-210: ActuatorApi implementation is correct.The generated client properly:
- Validates required parameters (line 121-126 for
sbom)- Encodes path parameters (line 133)
- Handles optional query parameters (lines 182-188 for
scrape)- Uses consistent async/raw pattern for all endpoints
215-220: Well-typed enum pattern.The
ScrapeFormatEnumuses the recommended TypeScript pattern of combining a const object with a derived type, providing both runtime values and type safety.refarch-frontend/src/api/refarch-backend/apis/ActuatorApi.ts (1)
37-210: Auto-generated API client looks correctly structured.The
ActuatorApiclass properly implements the actuator endpoints with appropriate parameter validation (e.g., requiredidcheck insbomRaw), query parameter handling, and the standard raw/wrapped method pattern.refarch-frontend/src/api/refarch-backend/runtime.ts (3)
244-249: Constructor shadowing in auto-generated code.Biome flags that
constructorshadows the global property. This is a standard pattern in the OpenAPI Generator'stypescript-fetchtemplate used for cloning API instances. Since this file is auto-generated and linting is disabled, this is acceptable. The variable name is contextually appropriate within theclone()method.
92-250: Well-structured runtime with middleware support.The
BaseAPIclass provides a robust request pipeline with pre/post middleware hooks, proper error handling throughResponseErrorandFetchError, and immutable cloning for middleware composition. This is standard OpenAPI Generator output and correctly implements the API client foundation.
16-16: TheConfigurationclass already provides a mechanism to overridebasePath, so consumers can configure the backend URL for their environment.While the hardcoded
localhost:39146is intentional for local development (the port is defined inapplication-local.yml), the design pattern properly supports overriding it viaConfigurationParameters.basePathfor production deployments.No action needed; the auto-generated code is working as intended.
Likely an incorrect or invalid review comment.
refarch-webcomponent/src/api/refarch-backend/models/TheEntityResponseDTO.ts (1)
21-72: DTO model correctly implements serialization pattern.The
TheEntityResponseDTOinterface and its JSON serialization helpers follow the standard OpenAPI Generator pattern. The null-safe deserialization (lines 48-55) and serialization (lines 63-71) are correctly implemented.refarch-webcomponent/src/api/refarch-backend/apis/index.ts (1)
1-4: Standard barrel file for API exports.This index file correctly consolidates the API client exports for the webcomponent module.
refarch-frontend/src/api/refarch-backend/apis/index.ts (1)
1-4: Standard barrel file for API exports.This index file correctly consolidates the API client exports for the frontend module.
refarch-frontend/src/api/refarch-backend/index.ts (1)
1-5: LGTM!Standard auto-generated barrel file that correctly re-exports runtime utilities, API clients, and models. The lint disables are appropriate for generated code.
refarch-frontend/src/api/refarch-backend/models/index.ts (1)
1-7: LGTM!Standard auto-generated models barrel file that correctly re-exports all DTO models.
refarch-webcomponent/src/api/refarch-backend/index.ts (1)
1-5: LGTM!Standard auto-generated barrel file, consistent with the frontend counterpart.
refarch-webcomponent/src/api/refarch-backend/models/PageMetadata.ts (1)
1-88: Auto-generated model file looks correct.The
PageMetadatainterface and serialization helpers follow the standard OpenAPI Generator typescript-fetch output pattern. The lint disables at the top are appropriate for generated code.refarch-webcomponent/src/api/refarch-backend/models/index.ts (1)
1-7: LGTM!Standard auto-generated barrel file correctly re-exporting all model types from the OpenAPI-generated models directory.
refarch-frontend/src/api/refarch-backend/apis/TheEntityControllerApi.ts (2)
1-13: Auto-generated OpenAPI client code looks correct.This is standard output from OpenAPI Generator's typescript-fetch template. The file is appropriately marked with lint disabling directives and the "Do not edit" warning, which aligns with the PR's approach of adding generated files to prettierignore and eslint-ignore lists.
56-246: API implementation follows correct patterns.The class implementation is well-structured:
- Proper parameter validation with
RequiredErrorfor required fields- Correct URL path parameter encoding using
encodeURIComponent- Appropriate HTTP methods (GET, POST, PUT, DELETE) for each operation
- Correct use of JSON serializers for request bodies and response parsing
- Raw methods expose
ApiResponse<T>for advanced use cases while convenience methods return typed results directlyrefarch-frontend/src/api/refarch-backend/models/TheEntityRequestDTO.ts (2)
1-28: Generated DTO model looks correct.The interface definition and type guard implementation are appropriate for the simple DTO structure with a single
textAttributeproperty.
38-65: JSON serialization helpers are correctly implemented.The FromJSON/ToJSON functions properly handle null checks and map the
textAttributefield. The typed variants support the discriminator pattern used by OpenAPI Generator for polymorphic models, even though this simple DTO doesn't require it.refarch-webcomponent/src/api/refarch-backend/apis/TheEntityControllerApi.ts (1)
56-246: API implementation is correct and consistent with frontend version.The class properly implements CRUD operations with appropriate parameter validation, path encoding, and JSON serialization. The implementation is identical to the frontend version, which is expected for generated code from the same OpenAPI spec.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| private clone<T extends BaseAPI>(this: T): T { | ||
| const constructor = this.constructor as any; | ||
| const next = new constructor(this.configuration); | ||
| next.middleware = this.middleware.slice(); | ||
| return next; | ||
| } |
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.
🧹 Nitpick | 🔵 Trivial
Variable constructor shadows global name (Biome warning).
This is a standard OpenAPI Generator pattern for cloning API instances. While Biome flags it, the shadowing is intentional and localized to this method. Since this is generated code, the fix would require customizing the generator template.
private clone<T extends BaseAPI>(this: T): T {
const constructor = this.constructor as any; // shadows global
const next = new constructor(this.configuration);
next.middleware = this.middleware.slice();
return next;
}If this warning is bothersome, you could add runtime.ts to Biome's ignore list or customize the OpenAPI Generator template to use a different variable name (e.g., ctor).
🧰 Tools
🪛 Biome (2.1.2)
[error] 245-245: Do not shadow the global "constructor" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
🤖 Prompt for AI Agents
In `@refarch-webcomponent/src/api/refarch-backend/runtime.ts` around lines 244 -
249, The method clone<T extends BaseAPI>(this: T) defines a local variable named
constructor which shadows the global name; rename that local variable (e.g., to
ctor or apiCtor) and update its usages inside the method (in the line that
instantiates new constructor(this.configuration)) to eliminate the shadowing, or
if you prefer not to change generated code, add runtime.ts to the Biome ignore
list or adjust the OpenAPI Generator template to emit a different variable name.
stack/openapitools.json
Outdated
| "generator-cli": { | ||
| "version": "7.9.0" | ||
| } |
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.
🧩 Analysis chain
🏁 Script executed:
# Find all openapitools.json files and show their content with path
fd -type f -name "openapitools.json" -exec sh -c 'echo "=== File: {} ==="; cat "{}"; echo' \;Repository: it-at-m/refarch-templates
Length of output: 239
🏁 Script executed:
# Find all openapitools.json files and show their content
fd --type f --name "openapitools.json" --exec sh -c 'echo "=== File: {} ==="; cat "{}"; echo' \;Repository: it-at-m/refarch-templates
Length of output: 319
🏁 Script executed:
# Find all openapitools.json files and display their contents
fd "openapitools.json" --exec sh -c 'echo "=== File: {} ==="; cat "{}"; echo' \;Repository: it-at-m/refarch-templates
Length of output: 1400
Align OpenAPI Generator CLI versions across stack and repository configurations.
The stack-level configuration uses generator-cli version 7.9.0, while both refarch-frontend and refarch-webcomponent use 7.13.0. Different generator versions produce different code structures and type definitions, creating inconsistencies in generated APIs across the codebase.
Update stack/openapitools.json to use version 7.13.0 to match the repository-level configurations.
🤖 Prompt for AI Agents
In `@stack/openapitools.json` around lines 4 - 6, Update the stack-level OpenAPI
Generator CLI version to match the repo: in stack/openapitools.json change the
"generator-cli" -> "version" value from "7.9.0" to "7.13.0" so it aligns with
refarch-frontend and refarch-webcomponent and ensures consistent generated code
and types across the codebase.
| node_modules | ||
|
|
||
| # Ignore generated api-folders only | ||
| src/api/*/ |
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.
There might be cases where we have custom hand written code in src/api so I suggest to change it to something like src/api/generated
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.
custom hand written is inside of /api as seperate files. Those are getting ignored.
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.
Yeah but what if you add custom subfolders in the API folder?
@simonhir @DanielOber What do you think about this?
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.
My thought on this: We implemented code geneation for apis - used it.
Smaller api or api-request can still be written in separated files, larger apis should be generated from a specification.
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.
For me personally, i would keep my generated APIs inside a generated folder. So i would prefer to ignore everything inside src/api/generated like Tobi said.
| }, | ||
| }, | ||
| globalIgnores(["dist", "target", "node_modules", "env.d.ts"]) | ||
| globalIgnores(["dist", "target", "node_modules", "env.d.ts", "src/api/*/**"]) |
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.
See previous comment
refarch-frontend/openapitools.json
Outdated
| "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", | ||
| "spaces": 2, | ||
| "generator-cli": { | ||
| "version": "7.13.0", |
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.
Where is this version coming from? Is it up to date?
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.
Long time ago yes - newest is 7.19.0
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.
Why not update to the latest version?
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 did - it is on 7.19.0. Generated code got updated too. See here
| }, | ||
| }, | ||
| globalIgnores(["dist", "target", "node_modules", "env.d.ts"]) | ||
| globalIgnores(["dist", "target", "node_modules", "env.d.ts", "src/api/*/**"]) |
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.
See frontend template
| @@ -0,0 +1,19 @@ | |||
| { | |||
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.
See frontend template
| @@ -0,0 +1,23 @@ | |||
| # OpenAPI Generator Ignore | |||
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.
See frontend template
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.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@refarch-frontend/package.json`:
- Line 35: The package.json dependency "@openapitools/openapi-generator-cli" is
pinned to 2.27.0 but should be updated to 2.28.0; open package.json, locate the
dependency entry for "@openapitools/openapi-generator-cli" and change its
version string from "2.27.0" to "2.28.0", then run your package manager's
install (npm/yarn/pnpm) to update lockfiles and verify build/scripts still work.
In `@refarch-webcomponent/package.json`:
- Around line 17-18: The api-gen npm script ("api-gen") relies on
openapi-generator-cli auto-discovering openapitools.json; add an explicit config
path to be defensive by appending --config ./openapitools.json to the "api-gen"
script in package.json so the CLI always uses the intended configuration
(reference: the "api-gen" script and openapitools.json).
| "@intlify/unplugin-vue-i18n": "11.0.3", | ||
| "@mdi/js": "7.4.47", | ||
| "@muenchen/prettier-codeformat": "1.0.2", | ||
| "@openapitools/openapi-generator-cli": "2.27.0", |
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the latest version of `@openapitools/openapi-generator-cli`
echo "Checking latest version from npm registry..."
curl -s https://registry.npmjs.org/@openapitools/openapi-generator-cli | jq -r '.["dist-tags"].latest'
echo -e "\nRecent versions:"
curl -s https://registry.npmjs.org/@openapitools/openapi-generator-cli | jq -r '.versions | keys | reverse | .[0:5][]'Repository: it-at-m/refarch-templates
Length of output: 168
🏁 Script executed:
# Verify alphabetical ordering in package.json around line 35
cd refarch-frontend 2>/dev/null || cd .
if [ -f package.json ]; then
echo "Dependencies around `@openapitools/openapi-generator-cli`:"
cat -n package.json | sed -n '30,40p'
else
echo "package.json not found in refarch-frontend"
fiRepository: it-at-m/refarch-templates
Length of output: 652
Update @openapitools/openapi-generator-cli to version 2.28.0.
Alphabetical ordering is correct, but the package version is outdated. The latest available version is 2.28.0; update from 2.27.0.
🤖 Prompt for AI Agents
In `@refarch-frontend/package.json` at line 35, The package.json dependency
"@openapitools/openapi-generator-cli" is pinned to 2.27.0 but should be updated
to 2.28.0; open package.json, locate the dependency entry for
"@openapitools/openapi-generator-cli" and change its version string from
"2.27.0" to "2.28.0", then run your package manager's install (npm/yarn/pnpm) to
update lockfiles and verify build/scripts still work.
| "fix": "prettier . --write && eslint . --fix --concurrency auto", | ||
| "api-gen": "openapi-generator-cli generate" |
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.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🏁 Script executed:
fd -a -t f '^openapitools\.json$'Repository: it-at-m/refarch-templates
Length of output: 180
🏁 Script executed:
# Check root package.json for workspace configuration
cat package.json 2>/dev/null | head -30
# Check if refarch-webcomponent openapitools.json has generatorVersion pinned
cat /home/jailuser/git/refarch-webcomponent/openapitools.jsonRepository: it-at-m/refarch-templates
Length of output: 544
🏁 Script executed:
# Read root package.json
head -50 /home/jailuser/git/package.jsonRepository: it-at-m/refarch-templates
Length of output: 159
🏁 Script executed:
# Find all package.json files in the repository
find . -maxdepth 3 -name "package.json" -type f
# Check if root has workspaces defined
git ls-files | grep -E "^package\.json$"Repository: it-at-m/refarch-templates
Length of output: 156
🏁 Script executed:
# Look for CI/CD configuration files
find . -maxdepth 2 \( -name ".github" -o -name ".gitlab-ci.yml" -o -name "Makefile" -o -name "tox.ini" \) -type d -o -type f
# Check if there are any script references in CI files
fd -e yml -e yaml -e json | head -20Repository: it-at-m/refarch-templates
Length of output: 3294
🏁 Script executed:
# Find and examine GitHub workflow files
find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null
# Look for any references to "api-gen" in workflows
rg "api-gen" .github/ 2>/dev/null
# Check if npm scripts are run with specific working directories
rg "npm.*run|working-directory" .github/ -A 2 2>/dev/nullRepository: it-at-m/refarch-templates
Length of output: 649
🏁 Script executed:
# Examine the npm-release.yml workflow
cat .github/workflows/npm-release.ymlRepository: it-at-m/refarch-templates
Length of output: 3080
🏁 Script executed:
# Read full refarch-webcomponent/package.json
cat refarch-webcomponent/package.jsonRepository: it-at-m/refarch-templates
Length of output: 1551
Adding explicit config path to api-gen is optional. The openapitools.json is correctly placed in the same directory as package.json, and since this is not a monorepo setup, the CLI will find it by default when the script runs. An explicit --config ./openapitools.json parameter would be a minor defensive improvement for clarity, but it's not necessary to ensure correct behavior in the current structure.
🤖 Prompt for AI Agents
In `@refarch-webcomponent/package.json` around lines 17 - 18, The api-gen npm
script ("api-gen") relies on openapi-generator-cli auto-discovering
openapitools.json; add an explicit config path to be defensive by appending
--config ./openapitools.json to the "api-gen" script in package.json so the CLI
always uses the intended configuration (reference: the "api-gen" script and
openapitools.json).
Pull Request
Changes
Reference
Issue: #619
Checklist
Note: If some checklist items are not relevant for your PR, just remove them.
General
I have read the Contribution Guidelines (TBD)Code
Frontend / WebComponent
package.json(if dependencies were changed)Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.