7 Commits

Author SHA1 Message Date
didavila
d47afb6ff1 fix: body param and 2xx response codes in repository generation
All checks were successful
Lint / lint (pull_request) Successful in 31s
Bug 1 - Body as positional argument (api.repository.impl.mustache):
MRepository HTTP methods accept a single RequestOptions object as second
argument. The template was incorrectly passing body as a separate positional
argument (e.g. this.post('/url', body)), causing:
  'Type X has no properties in common with type RequestOptions'
Fix: merge body into the options object using ES6 shorthand { body }, and
introduce hasOptions / hasBothParamsAndBody flags to build a single unified
options literal covering all scenarios:
  - no options    → this.post('/url')
  - params only   → this.get('/url', { params: { search } })
  - body only     → this.post('/url', { body })
  - params + body → this.post('/url', { params: { search }, body })

Bug 2 - Only 200 responses read (clean-arch.generator.ts):
The generator was hardcoded to read op.responses['200'], silently ignoring
201 Created, 202 Accepted, etc. POST endpoints returning 201 were generated
as Observable<void> instead of their actual return type.
Fix: resolve the first available success code from [200, 201, 202, 203].

New fields added to TagOperation type:
  - uppercaseHttpMethod: string
  - hasOptions: boolean
  - hasBothParamsAndBody: boolean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 11:17:37 +01:00
4aeb108c55 feat: add base url mechanism 2026-03-24 19:15:47 +01:00
didavila
5229a3ad45 refactor: separate return and param imports in Clean Architecture generator 2026-03-24 16:40:34 +01:00
didavila
82b734bc55 fix: correct import paths in use cases provider and update response mapping in repository implementation 2026-03-24 15:37:34 +01:00
didavila
fc3d95052c fix: update import paths for repository and mapper templates 2026-03-24 15:15:06 +01:00
didavila
4905f84d2c fix: fix template variable wrapping to fit java requirements 2026-03-23 15:06:11 +01:00
Blas Santome Ocampo
5ff88d8cf6 first commit 2026-03-23 09:35:15 +01:00