20 Commits

Author SHA1 Message Date
c1ccaf20ec
[FEAT] rework the generation of code for typescript (#27)
This PR is not compatible with previous code...
Rename some Annotation to have a better experience

Update the generation of the Typescript object 
===================================

By default the generation of object are only the object requested

if you annotate the object with: `@ApiGenerationMode(create = true,
update = true)`

the generation will add 2 object in typescript:
  - `MyClassUpdate` that contain the object specific for `PUT` request
  - `MyClassCreate` that contain the object specific for `POST` request
  - the PATCH request are generate with `Partial<MyClassUpdate>`

If you do not generate the create or update the system will wrap the
bass by default: `MyClass`

Add support of hidding the element in the generated object
=============================================

When generate the object some field are not needed to transmit to the
client, then we add `@ApiAccessLimitation(creatable = false, updatable =
false)` that permit to remove the field when Update or Create object are
generated

It will be used to check the Input validity instead of
`@schema(readonly)` (error of implementation)


TODO:
=====

  - Some issue when request Update generation and parent does not exist
- The checker is not updated with the use of the `@ApiAccessLimitation`
decorator.


dependencies:
===========
  - Closes: https://github.com/kangaroo-and-rabbit/archidata/issues/22
2025-03-08 14:32:16 +01:00
2174d7689f [FEAT] add callback to detect and collect errors 2025-03-05 23:48:15 +01:00
cd3a6a1d8b [FIX] missing ARCHIVE & RESTORE in OPTION and correct the typescript request 2024-10-23 16:32:00 +02:00
Edouard DUPIN
5c1b7cd193 [FIX] add missing ARCHIVE and RESTORE in the rest-tool.ts 2024-10-23 10:59:12 +02:00
b479414bc2 [FIX] callbacks elements 2024-06-12 00:54:22 +02:00
Yoann Fleury
0b57d8571c
fix: plural for callbacks 2024-06-11 12:41:31 +02:00
1fe3cc3523 [FIX] Correct the fail retur API to transmit the error from backend when compatible and wrat it when error occured 2024-05-31 21:50:50 +02:00
8c30336bdb [FIX] Correct Rest tool interface for stric mode of Typescript 2024-05-22 17:27:36 +02:00
4dabfcf7d7 [DEV] full rework of Typescript generator (operational) 2024-05-21 23:53:31 +02:00
9ac3a95060 [FEAT] model generation is ready 2024-05-21 23:53:31 +02:00
f1a31fed56 [FIX] permit to not check the type getted 2024-05-09 00:12:42 +02:00
7c087fcd8f [FIX] correct the void get values 2024-05-09 00:11:14 +02:00
f06b5a1edc [DEV] set code compatible with ES2018 2024-05-08 19:11:04 +02:00
08124f212a [DEV] update REST tool for TS 2024-04-17 23:08:06 +02:00
7674d9a299 [DEV] well support of the callback for stream 2024-04-17 12:12:50 +02:00
9cd71ab601 [DEV] add progress callback ==> does not work 2024-04-15 00:56:00 +02:00
5acdbfb0c7 [DEV] update models 2024-03-29 22:37:54 +01:00
15a7814a3b [DEV] update new model 2024-03-19 08:37:07 +01:00
530d254bf2 Many correction of the cover, data ... 2024-03-17 23:43:56 +01:00
6944331761 [DEV] add capability to copy the tool file 2024-03-11 22:51:04 +01:00