Dashboard request data field is sometimes disabled with no example

Aperta
#73 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend, frontend

Direzione di ricerca

Start in src/TickerNet.Utilities/TickerHelper.cs around line 19, where the request JsonSerializerOptions are built without a type info resolver. Then read JsonExampleGenerator (around lines 26-35) to see why the GetTypeInfo failure is cached, and CRUDTimeTickerDialogComponent.vue around lines 528-530 where a missing example disables the field. Write a test that reproduces the empty functionRequestType before changing the resolver and cache behaviour; done means examples generate on first use and the dialog field stays editable.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

.NET bug javascript

What happens

In the dashboard's "Add time ticker" dialog, the request data field is sometimes disabled and the example is empty, and functionRequestType is empty in the functions API. It can start working later without any change.

The request JSON options (TickerHelper, src/TickerNet.Utilities/TickerHelper.cs, around line 19) default to new JsonSerializerOptions() with no type info resolver. JsonExampleGenerator (around line 26) calls GetTypeInfo, which throws until some other serialisation has set a resolver, and the failure is cached for good (around lines 28-35). The dialog then disables the field because there's no example (CRUDTimeTickerDialogComponent.vue, around lines 528-530).

Fix idea

Give the request options a resolver by default (DefaultJsonTypeInfoResolver when reflection is enabled), don't cache failures, and keep the field editable when there's no example.


Found while checking which problems that TickerQ fixed after the fork still exist in TickerNet. Fix it from this description and TickerNet's own code only: never read or copy code from TickerQ 10.5.0 or later (see CONTRIBUTING.md). Please add a test that fails before the fix.

Lingua principale
C#
Stelle
0
Fork
2
Merge medio
1h 8m
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TickerNet/TickerNet

Tutte le issue di TickerNet/TickerNet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.