@chill-sharp/ui-core 1.1.12 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +103 -103
  2. package/fesm2022/chill-sharp-ui-core.mjs +2446 -2446
  3. package/fesm2022/chill-sharp-ui-core.mjs.map +1 -1
  4. package/lib/lib/chill-form.component.d.ts +1 -1
  5. package/package.json +3 -3
  6. package/service-worker/chill-sharp-service-worker.js +166 -166
  7. package/styles/core-theme.scss +1235 -1235
  8. package/.agents/skills/chillsharp-current-user-preferences/SKILL.md +0 -70
  9. package/.agents/skills/chillsharp-ui-template/SKILL.md +0 -18
  10. package/doc/AIAssistedDevelopment/README.md +0 -185
  11. package/doc/AttachmentModel/README.md +0 -173
  12. package/doc/AuthenticationModel/README.md +0 -213
  13. package/doc/AuthenticationModel/how-to-integreate-auth-minimal-api.md +0 -293
  14. package/doc/ChillSharpClient.md +0 -464
  15. package/doc/ClientGeneration/README.md +0 -172
  16. package/doc/ComplianceGuide/README.md +0 -178
  17. package/doc/Configuration/README.md +0 -94
  18. package/doc/CurrentUserPreferences.md +0 -114
  19. package/doc/DateTimePolicy/README.md +0 -154
  20. package/doc/DateTimeSerialization.md +0 -423
  21. package/doc/Endpoints.md +0 -260
  22. package/doc/HowTo/01-simple-blog-sqlite.md +0 -153
  23. package/doc/HowTo/02-blog-schema-labels.md +0 -140
  24. package/doc/HowTo/03-authentication.md +0 -218
  25. package/doc/HowTo/04-blog-posts-one-to-many.md +0 -194
  26. package/doc/HowTo/05-docker-env-variables.md +0 -274
  27. package/doc/HowTo/06-chunk-transactions-autocomplete.md +0 -196
  28. package/doc/Mcp/ChatGPT.md +0 -291
  29. package/doc/Mcp/README.md +0 -799
  30. package/doc/MenuGuide/README.md +0 -49
  31. package/doc/ModelPreparation.md +0 -255
  32. package/doc/PermissionModel/README.md +0 -277
  33. package/doc/README.md +0 -228
  34. package/doc/ReferenceExistence.md +0 -130
  35. package/doc/RegisterContext.md +0 -217
  36. package/doc/UiCore/CRUD.md +0 -170
  37. package/doc/UiCore/README.md +0 -13
  38. package/doc/ValidationModel/README.md +0 -117
  39. package/doc/it/AIAssistedDevelopment/README.md +0 -185
  40. package/doc/it/AttachmentModel/README.md +0 -173
  41. package/doc/it/AuthenticationModel/README.md +0 -171
  42. package/doc/it/AuthenticationModel/how-to-integreate-auth-minimal-api.md +0 -292
  43. package/doc/it/ChillSharpClient.md +0 -464
  44. package/doc/it/ClientGeneration/README.md +0 -152
  45. package/doc/it/ComplianceGuide/README.md +0 -178
  46. package/doc/it/Configuration/README.md +0 -94
  47. package/doc/it/CurrentUserPreferences.md +0 -114
  48. package/doc/it/DateTimePolicy/README.md +0 -154
  49. package/doc/it/DateTimeSerialization.md +0 -423
  50. package/doc/it/Endpoints.md +0 -260
  51. package/doc/it/HowTo/01-simple-blog-sqlite.md +0 -152
  52. package/doc/it/HowTo/02-blog-schema-labels.md +0 -139
  53. package/doc/it/HowTo/03-authentication.md +0 -221
  54. package/doc/it/HowTo/04-blog-posts-one-to-many.md +0 -193
  55. package/doc/it/HowTo/05-docker-env-variables.md +0 -268
  56. package/doc/it/HowTo/06-chunk-transactions-autocomplete.md +0 -196
  57. package/doc/it/Mcp/ChatGPT.md +0 -291
  58. package/doc/it/Mcp/README.md +0 -799
  59. package/doc/it/MenuGuide/README.md +0 -49
  60. package/doc/it/ModelPreparation.md +0 -254
  61. package/doc/it/PermissionModel/README.md +0 -190
  62. package/doc/it/README.md +0 -172
  63. package/doc/it/ReferenceExistence.md +0 -130
  64. package/doc/it/RegisterContext.md +0 -218
  65. package/doc/it/UiCore/CRUD.md +0 -170
  66. package/doc/it/UiCore/README.md +0 -13
  67. package/doc/it/ValidationModel/README.md +0 -117
  68. package/template-customization/upgrade.ps1.template +0 -342
  69. package/template-customization/upgrade.sh.template +0 -271
@@ -1,464 +0,0 @@
1
- # ChillSharp.Client
2
-
3
- Versione originale in inglese: [English](../ChillSharpClient.md)
4
-
5
-
6
- `ChillSharp.Client` è la libreria client .NET per chiamare un host ChillSharp da app console, lavoratori, test, app desktop o altri servizi .NET.
7
-
8
- Usalo quando il consumer è .NET. Per i framework browser o l'automazione Python, utilizzare i client generici in `extra-libs/` o generare un client specifico dell'host da OpenAPI.
9
-
10
- ## Installa
11
-
12
- Fare riferimento al progetto o al pacchetto `ChillSharp.Client` dall'applicazione .NET che utilizza.
13
-
14
- ```xml
15
- <ProjectReference Include="..\ChillSharp.Client\ChillSharp.Client.csproj" />
16
- ```
17
-
18
- Quindi importa gli spazi dei nomi client:
19
-
20
- ```csharp
21
- using ChillSharp.Client;
22
- using ChillSharp.Client.Dto;
23
- ```
24
-
25
- I metodi dell'account di autenticazione utilizzano contratti di richiesta e risposta da `ChillSharp.Auth.Contracts`:
26
-
27
- ```csharp
28
- using ChillSharp.Auth.Contracts;
29
- ```
30
-
31
- I metodi I18n utilizzano contratti da `ChillSharp.I18n.Contracts`:
32
-
33
- ```csharp
34
- using ChillSharp.I18n.Contracts;
35
- ```
36
-
37
- ## Crea un cliente
38
-
39
- L'URL di base normale è l'endpoint principale di ChillSharp:
40
-
41
- ```csharp
42
- var client = new ChillSharpClient("http://localhost:5000/api/chill");
43
- ```
44
-
45
- Puoi anche passare la root dell'host. Il client aggiunge il percorso `api/chill` predefinito:
46
-
47
- ```csharp
48
- var client = new ChillSharpClient("http://localhost:5000");
49
- ```
50
-
51
- Per un percorso di base API personalizzato:
52
-
53
- ```csharp
54
- var client = new ChillSharpClient(
55
- "http://localhost:5000",
56
- new ChillSharpClientOptions { ApiBasePath = "backend" });
57
- ```
58
-
59
- Questo risolve l'API principale come:
60
-
61
- ```text
62
- http://localhost:5000/backend/chill
63
- ```
64
-
65
- ## Cultura
66
-
67
- Passa una cultura predefinita durante la lettura di schemi o testo i18n:
68
-
69
- ```csharp
70
- var client = new ChillSharpClient(
71
- "http://localhost:5000/api/chill",
72
- CultureName: "it-IT");
73
-
74
- var schema = client.GetSchema("Model.Blog", "default");
75
- ```
76
-
77
- Puoi comunque sovrascrivere la cultura per chiamata allo schema:
78
-
79
- ```csharp
80
- var englishSchema = client.GetSchema("Model.Blog", "default", "en-GB");
81
- ```
82
-
83
- ## Autenticazione
84
-
85
- Se l'API è protetta, esegui l'autenticazione con uno di questi modelli.
86
-
87
- Utilizza un token al portatore esistente:
88
-
89
- ```csharp
90
- var client = new ChillSharpClient(
91
- "http://localhost:5000/api/chill",
92
- AuthToken: accessToken);
93
- ```
94
-
95
- Utilizza le credenziali e consenti al client di accedere su richiesta:
96
-
97
- ```csharp
98
- var client = new ChillSharpClient(
99
- "http://localhost:5000/api/chill",
100
- UserName: "admin",
101
- Password: "Pass123$");
102
- ```
103
-
104
- Registrati o accedi tramite gli endpoint dell'account di autenticazione:
105
-
106
- ```csharp
107
- var client = new ChillSharpClient("http://localhost:5000/api/chill");
108
-
109
- var token = client.LoginAuthAccount(new LoginAuthIdentityRequest
110
- {
111
- UserNameOrEmail = "admin",
112
- Password = "Pass123$"
113
- });
114
- ```
115
-
116
- Il client archivia il token di accesso restituito e il token di aggiornamento. Le chiamate autenticate successivamente riutilizzano il token di accesso e lo aggiornano automaticamente quando possibile.
117
-
118
- Per forzare l'aggiornamento:
119
-
120
- ```csharp
121
- client.RefreshAuthAccount();
122
- ```
123
-
124
- Per revocare la sessione corrente:
125
-
126
- ```csharp
127
- client.LogoutAuthAccount();
128
- ```
129
-
130
- ## Operazioni dell'entità principale
131
-
132
- Le chiamate alle entità ChillSharp utilizzano `ChillDtoEntity`.
133
-
134
- Creare:
135
-
136
- ```csharp
137
- var blog = new ChillDtoEntity
138
- {
139
- ChillType = "Model.Blog"
140
- };
141
- blog.Properties["Title"] = "My first blog";
142
- blog.Properties["Description"] = "Created through ChillSharp.Client";
143
-
144
- var created = client.Create(blog);
145
- ```
146
-
147
- Trovare:
148
-
149
- ```csharp
150
- var found = client.Find(new ChillDtoEntity
151
- {
152
- ChillType = "Model.Blog",
153
- Guid = created.Guid
154
- });
155
- ```
156
-
157
- Aggiornamento:
158
-
159
- ```csharp
160
- created.Properties["Title"] = "Updated blog";
161
- var updated = client.Update(created);
162
- ```
163
-
164
- Eliminare:
165
-
166
- ```csharp
167
- client.Delete(updated);
168
- ```
169
-
170
- Convalida senza salvare:
171
-
172
- ```csharp
173
- var errors = client.Validate(blog);
174
- ```
175
-
176
- ## Interrogazione e ricerca
177
-
178
- Utilizza `Query` quando l'host espone un tipo di query di entità:
179
-
180
- ```csharp
181
- var query = new ChillDtoQuery
182
- {
183
- ChillType = "Query.BlogQuery",
184
- Pagination = new ChillPagination
185
- {
186
- Page = 1,
187
- PageResults = 20
188
- }
189
- };
190
-
191
- query.Properties["FullTextSearch"] = "release notes";
192
-
193
- var result = client.Query(query);
194
- foreach (var item in result.Results)
195
- {
196
- Console.WriteLine(item.Label);
197
- }
198
- ```
199
-
200
- Utilizza `Lookup` per la ricerca generica di entità di testo completo:
201
-
202
- ```csharp
203
- var lookup = client.Lookup(new ChillDtoQuery
204
- {
205
- ChillType = "Model.Blog",
206
- Properties =
207
- {
208
- ["FullTextSearch"] = "release"
209
- }
210
- });
211
- ```
212
-
213
- `FullTextSearch` effettua ricerche contro ChillSharp `FullTextContent`. Il testo senza virgolette senza selettori avanzati è normalizzato, suddiviso in spazi bianchi e abbinato a AND, quindi ogni token deve essere presente. Le parentesi più gli operatori `and`/`or` autonomi al di fuori delle virgolette consentono la ricerca booleana raggruppata. Cerca le parole letterali `and` o `or` racchiudendole tra virgolette corrispondenti. Le virgolette singole o doppie corrispondenti cercano una frase normalizzata con i limiti delle parole:
214
-
215
- | Cerca testo | Significato |
216
- | --- | --- |
217
- | | Record di corrispondenza contenenti sia `release` che `notes`. |
218
- | | Abbina record contenenti sia `release` che `notes` oppure record contenenti `memo`. |
219
- | | Cerca la parola chiave letterale `and` anziché l'operatore booleano. |
220
- | | Abbina la frase esatta come parole intere, ad esempio `bla bla la nazione bla bla`, ma non `bla bla della nazione bla bla`. |
221
- | `"*la nazione"` o `"%la nazione"` | Rilassa il confine sinistro, in modo che `della nazione` possa corrispondere. |
222
- | `"la nazione*"` o `"la nazione%"` | Rilassa il confine destro, in modo che un suffisso possa corrispondere. |
223
- | `"la*nazione"` o `"la%nazione"` | Tratta il carattere jolly centrale come un separatore di token e applica la normale corrispondenza dei token AND. |
224
-
225
- ## Operazioni batch
226
-
227
- Utilizzare `Chunk` per inviare diverse operazioni in una chiamata HTTP.
228
-
229
- ```csharp
230
- var operations = new List<ChillOperation>
231
- {
232
- new() { Index = 0, Verb = ChillOperationVerb.TRANSACTION },
233
- new()
234
- {
235
- Index = 1,
236
- Verb = ChillOperationVerb.CREATE,
237
- Entity = new ChillDtoEntity
238
- {
239
- ChillType = "Model.Blog",
240
- Properties =
241
- {
242
- ["Title"] = "Batch blog"
243
- }
244
- }
245
- },
246
- new() { Index = 2, Verb = ChillOperationVerb.COMMIT }
247
- };
248
-
249
- var processed = client.Chunk(operations);
250
- ```
251
-
252
- Utilizzare un wrapper di transazione/commit quando è necessario eseguire il commit delle operazioni di scrittura insieme.
253
-
254
- ## Schema e menù
255
-
256
- Leggi i metadati dello schema:
257
-
258
- ```csharp
259
- var schema = client.GetSchema("Model.Blog", "default");
260
- var schemaList = client.GetSchemaList();
261
- ```
262
-
263
- Gestisci le opzioni dell'entità:
264
-
265
- ```csharp
266
- var options = client.GetEntityOptions("Model.Blog");
267
- options.HandleAttachments = true;
268
- client.SetEntityOptions(options);
269
- ```
270
-
271
- Leggi i nodi del menu:
272
-
273
- ```csharp
274
- var rootItems = client.GetMenu();
275
- var children = client.GetMenu(rootItems[0].Guid);
276
- ```
277
-
278
- Crea o aggiorna una voce di menu:
279
-
280
- ```csharp
281
- var item = client.SetMenu(new ChillDtoMenuItem
282
- {
283
- PositionNo = 10,
284
- Title = "Blogs",
285
- ComponentName = "CRUD",
286
- MenuHierarchy = "CONTENT.BLOGS"
287
- });
288
- ```
289
-
290
- Elimina una voce di menu e i suoi discendenti:
291
-
292
- ```csharp
293
- client.DeleteMenu(item.Guid);
294
- ```
295
-
296
- Le operazioni di scrittura dello schema richiedono l'accesso alla gestione dello schema sugli host protetti.
297
-
298
- ## Gestione autenticazione
299
-
300
- Gli assistenti per la gestione dell'autenticazione sono disponibili quando l'host registra `ChillSharp.Auth`.
301
-
302
- ```csharp
303
- var users = client.GetAuthUsers();
304
- var roles = client.GetAuthRoles();
305
- var permissions = client.GetAuthPermissions();
306
- ```
307
-
308
- Crea un utente di autenticazione gestita:
309
-
310
- ```csharp
311
- var user = client.CreateAuthUser(new CreateAuthUserRequest
312
- {
313
- ExternalId = "external-user-id",
314
- UserName = "editor",
315
- DisplayName = "Editor",
316
- IsActive = true,
317
- MenuHierarchy = "CONTENT"
318
- });
319
- ```
320
-
321
- Crea un ruolo e assegnalo:
322
-
323
- ```csharp
324
- var role = client.CreateAuthRole(new CreateAuthRoleRequest
325
- {
326
- Name = "Editors",
327
- IsActive = true,
328
- MenuHierarchy = "CONTENT"
329
- });
330
-
331
- client.AssignAuthRole(user.Guid, role.Guid);
332
- ```
333
-
334
- Per schermate di amministrazione più ricche, utilizza gli helper aggregati:
335
-
336
- ```csharp
337
- var managedUser = client.GetAuthManagedUser(user.Guid);
338
- var roleList = client.GetAuthRoleList();
339
- var moduleList = client.GetAuthModuleList();
340
- ```
341
-
342
- ##I18n
343
-
344
- Leggere un testo localizzato:
345
-
346
- ```csharp
347
- var text = client.GetText(new GetTextRequest
348
- {
349
- LabelGuid = labelGuid,
350
- CultureName = "it-IT",
351
- PrimaryDefaultText = "Hello"
352
- });
353
- ```
354
-
355
- Leggi diversi testi:
356
-
357
- ```csharp
358
- var texts = client.GetTexts(requests);
359
- ```
360
-
361
- Crea o aggiorna un testo:
362
-
363
- ```csharp
364
- client.SetText(new SetTextRequest
365
- {
366
- LabelGuid = labelGuid,
367
- CultureName = "it-IT",
368
- Value = "Ciao"
369
- });
370
- ```
371
-
372
- ## Allegati
373
-
374
- Carica un file e allegalo a un'entità:
375
-
376
- ```csharp
377
- var files = client.UploadAttachment(
378
- created,
379
- @"C:\temp\contract.pdf",
380
- title: "Contract");
381
- ```
382
-
383
- Elenca gli allegati per un'entità:
384
-
385
- ```csharp
386
- var attachments = client.GetAttachments(created);
387
- ```
388
-
389
- Scarica un allegato:
390
-
391
- ```csharp
392
- var bytes = client.DownloadAttachment(attachments[0].Guid);
393
- ```
394
-
395
- Scarica direttamente in un file:
396
-
397
- ```csharp
398
- client.DownloadAttachmentToFile(
399
- attachments[0].Guid,
400
- @"C:\temp\downloaded-contract.pdf");
401
- ```
402
-
403
- Il caricamento degli allegati e il download privato richiedono il modulo degli allegati e la configurazione di autenticazione appropriata.
404
-
405
- ## HttpClient personalizzato
406
-
407
- Utilizza una factory personalizzata quando i test o l'integrazione dell'host richiedono intestazioni, gestori o certificati speciali:
408
-
409
- ```csharp
410
- var client = new ChillSharpClient(
411
- "http://localhost:5000/api/chill",
412
- () =>
413
- {
414
- var httpClient = new HttpClient();
415
- httpClient.DefaultRequestHeaders.Add("X-Test-User", "integration-user");
416
- return httpClient;
417
- });
418
- ```
419
-
420
- La factory viene richiamata per ogni richiesta. Elimina eventuali risorse esterne in base alla strategia `HttpClient` della tua applicazione.
421
-
422
- ## Errori
423
-
424
- Gli errori del server e gli errori di trasporto sono racchiusi in `ChillClientException`.
425
-
426
- ```csharp
427
- try
428
- {
429
- client.Create(blog);
430
- }
431
- catch (ChillClientException ex)
432
- {
433
- Console.WriteLine(ex.Message);
434
- }
435
- ```
436
-
437
- Per gli errori HTTP, il messaggio di eccezione include il codice di stato e il corpo della risposta, se disponibile.
438
-
439
- ## Risoluzione dell'endpoint
440
-
441
- Da un URL principale che termina con `/chill`, il client risolve automaticamente gli endpoint del modulo:
442
-
443
- | Modulo | Endpoint risolto |
444
- | --- | --- |
445
- | Nucleo | |
446
- | Aut. | |
447
- | Schema | |
448
- | I18n | |
449
- | Allegato | |
450
-
451
- Per esempio:
452
-
453
- ```csharp
454
- var client = new ChillSharpClient("http://localhost:5000/api/chill");
455
- client.GetMenu(); // calls /api/chill-schema/get-menu
456
- client.LoginAuthAccount(...); // calls /api/chill-auth/login
457
- ```
458
-
459
- ## Documentazione correlata
460
-
461
- - [Modello di autenticazione/README.md](./AuthenticationModel/README.md)
462
- - [MenuGuide/README.md](../MenuGuide/README.md)
463
- - [Modelloallegato/README.md](./AttachmentModel/README.md)
464
- - [ClientGeneration/README.md](./ClientGeneration/README.md)
@@ -1,152 +0,0 @@
1
- # Generare Librerie Client
2
-
3
- Versione originale in inglese: [English](../../ClientGeneration/README.md)
4
-
5
- Questa sezione spiega come generare librerie client non-.NET per un host ChillSharp.
6
-
7
- Target coperti qui:
8
-
9
- - TypeScript
10
- - Python
11
-
12
- Per client generici gia pronti inclusi in questo repository, vedi:
13
-
14
- - [../../../ext/chill-sharp-ts-client/README.md](../../../ext/chill-sharp-ts-client/README.md)
15
- - [../../../ext/chill-sharp-react-client/README.md](../../../ext/chill-sharp-react-client/README.md)
16
- - [../../../ext/chill-sharp-vue-client/README.md](../../../ext/chill-sharp-vue-client/README.md)
17
- - [../../../ext/chill-sharp-ng-client/README.md](../../../ext/chill-sharp-ng-client/README.md)
18
- - [../../../ext/chill-sharp-py-client/README.md](../../../ext/chill-sharp-py-client/README.md)
19
-
20
- Questi pacchetti sono wrapper generici della HTTP API standard di ChillSharp. Il resto di questo documento copre la generazione di client specifici per host a partire da OpenAPI.
21
-
22
- ## Vincolo Importante
23
-
24
- ChillSharp non pubblica automaticamente un documento OpenAPI da solo.
25
-
26
- La generazione client dipende quindi dal fatto che l'applicazione host ne esponga uno tramite il normale tooling Swagger/OpenAPI di ASP.NET Core.
27
-
28
- ## 1. Esporre OpenAPI Nell'Host
29
-
30
- Aggiungi la generazione Swagger all'applicazione host:
31
-
32
- ```csharp
33
- builder.Services.AddEndpointsApiExplorer();
34
- builder.Services.AddSwaggerGen();
35
-
36
- var app = builder.Build();
37
-
38
- app.UseSwagger();
39
- app.UseSwaggerUI();
40
- app.MapChillApi();
41
- ```
42
-
43
- Con questa configurazione, un documento Swagger JSON standard e di solito disponibile a:
44
-
45
- ```text
46
- /swagger/v1/swagger.json
47
- ```
48
-
49
- Esempio:
50
-
51
- ```text
52
- http://localhost:5000/swagger/v1/swagger.json
53
- ```
54
-
55
- ## 2. Decidere Cosa Deve Coprire Il Client Generato
56
-
57
- Un host ChillSharp puo esporre varie superfici:
58
-
59
- - core Chill API
60
- - endpoint auth/account
61
- - endpoint di gestione auth
62
- - endpoint i18n
63
-
64
- Se tutti i moduli sono registrati nello stesso host e Swagger e abilitato globalmente, il documento OpenAPI generato puo includerli tutti.
65
-
66
- ## 3. Generare Un Client TypeScript
67
-
68
- Un'opzione pratica e `openapi-generator-cli`.
69
-
70
- Installalo o usalo tramite il package manager che preferisci, poi esegui:
71
-
72
- ```bash
73
- openapi-generator-cli generate \
74
- -i http://localhost:5000/swagger/v1/swagger.json \
75
- -g typescript-fetch \
76
- -o generated/ts-client
77
- ```
78
-
79
- Altri generatori TypeScript utili includono:
80
-
81
- - `typescript-axios`
82
- - `typescript-angular`
83
-
84
- Esempio:
85
-
86
- ```bash
87
- openapi-generator-cli generate \
88
- -i http://localhost:5000/swagger/v1/swagger.json \
89
- -g typescript-axios \
90
- -o generated/ts-client
91
- ```
92
-
93
- ## 4. Generare Un Client Python
94
-
95
- Usando lo stesso documento OpenAPI:
96
-
97
- ```bash
98
- openapi-generator-cli generate \
99
- -i http://localhost:5000/swagger/v1/swagger.json \
100
- -g python \
101
- -o generated/python-client
102
- ```
103
-
104
- Questo produce un pacchetto Python con model request e wrapper API basati sulla descrizione OpenAPI pubblicata.
105
-
106
- ## 5. Note Specifiche Dell'Host
107
-
108
- I client generati sono accurati solo quanto il documento OpenAPI dell'host.
109
-
110
- Questo significa che:
111
-
112
- - se l'host non espone Swagger, non c'e nulla da cui generare
113
- - se l'host esclude alcuni controller, quegli endpoint non compariranno nel client generato
114
- - se auth e abilitata, il client generato dovra comunque essere configurato per gestire i bearer token
115
-
116
- ## 6. Workflow Consigliato
117
-
118
- Per TypeScript e Python, il workflow consigliato e:
119
-
120
- 1. build dell'host ChillSharp
121
- 2. aggiungere Swagger/OpenAPI all'host
122
- 3. avviare l'host localmente o in CI
123
- 4. esportare `/swagger/v1/swagger.json`
124
- 5. generare la libreria client
125
- 6. pubblicare o committare il client generato secondo il workflow del progetto
126
-
127
- ## 7. Quando Preferire `ChillSharp.Client`
128
-
129
- Se il consumer e .NET, preferisci `ChillSharp.Client`.
130
-
131
- Usa client generati TypeScript o Python quando:
132
-
133
- - il frontend e browser-based e non .NET
134
- - ti servono automazioni o integrazioni Python
135
- - vuoi client fortemente tipizzati in ambienti non-.NET
136
-
137
- Se non ti servono tipi generati specifici dell'host, puoi anche usare i client generici presenti in `ext/`:
138
-
139
- - `ext/chill-sharp-ts-client`
140
- - `ext/chill-sharp-react-client`
141
- - `ext/chill-sharp-vue-client`
142
- - `ext/chill-sharp-ng-client`
143
- - `ext/chill-sharp-py-client`
144
-
145
- ## 8. Indicazioni Di Stabilita
146
-
147
- Se prevedi di generare client regolarmente:
148
-
149
- - mantieni stabili le route pubbliche dell'host
150
- - versiona l'API
151
- - rigenera i client come parte del workflow di release
152
- - tratta i cambi di shape OpenAPI come cambiamenti di contratto pubblico