Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Allow to specify `named-values` **in addition** to `allowed-values` for `enum` types

Aperta
#345 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, kotlin

Direzione di ricerca

No files or tests are named. Start by locating the enum handling and JAR binding-generation entry points, then trace how allowed-values become generated constants. Done means supporting named-values alongside allowed-values, including mixed named and unnamed entries, without duplicate generated names or compilation failures.

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

Descrizione

Currently we only generate constant values for enums from their content.
If you have quite long or awkward possible values like the terms of use URL of the setup-gradle action, the names are a bit unhandy.

Additionally, if you have an enum with values that calculate to the same name like

inputs:
  some-enum:
    type: enum
    allowed-values:
      - foo-bar
      - foo_bar

which both evaluate to FooBar, you get a 500 internal server error as soon as you request the JAR, because a compile error will happen when trying to compile the bindings.

The latter could maybe also be solved by some logic to make the names unique,
but it could also be solved by this feature request which means, that you can give explicit names for enum values.

I think it makes sense to allow unnamed and named in the same element.

Lingua principale
Kotlin
Stelle
69
Fork
4
Merge medio
7g 3h
PR unite (30g)
7

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 typesafegithub/github-actions-typing

Tutte le issue di typesafegithub/github-actions-typing

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.