Dashboard request data field is sometimes disabled with no example

Offen
#73 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
70/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
csharp
Bereich
backend, frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

.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.

Vorherrschende Sprache
C#
Sterne
0
Forks
2
Ø Merge
1 Std. 8 Min.
Gemergte PRs (30 T.)
24

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TickerNet/TickerNet

Alle Issues in TickerNet/TickerNet

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.