OAI / OAI/OpenAPI-Specification
Components fields name too restrictive?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Markdown
- Stelle
- 31.2k
- Fork
- 9.2k
- Merge medio
- 6h 37m
- PR unite (30g)
- 27
Descrizione
Components fields name currently has this regex as restrictions: ^[a-zA-Z0-9\.\-_]+$
This was mainly discussed and agreed on in #634.
I found this restriction a little too restrictive. I'd imagine that for the Schemas part of the component, most people will use class names as field names. Allowing the period (.) is good because that allows you to add namespace to class name Namespace.ClassName.
However, quite a number of languages have generics and APIs can have request body that are of type implementing generics. The current allowed characters make it very difficult to represent class name that is derived from generic type. The most intuitive (I think) way to represent generic class name as string is to use some kind of brackets/parentheses Namespace.GenericClassName(AnotherClassName). Of course, one can bypass this by using the allowed underscore or hyphen instead, but that just looks plain ugly.
Should we allow parentheses and/or brackets?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con l’espressione regolare per i nomi dei campi dei componenti mostrata nell’issue e leggi la discussione precedente in #634. Determina se per i nomi dei tipi generici debbano essere consentite le parentesi tonde o quadre, quindi aggiorna la specifica e tutte le indicazioni di convalida correlate una volta definita la decisione sulla sintassi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- openapi
- Ambito
- api, documentation
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100