commercetools / commercetools/rmf-codegen
RAML Doc generator loses content type for file types
- Lingua principale
- Kotlin
- Stelle
- 16
- Fork
- 7
- Merge medio
- 1g 3h
- PR unite (30g)
- 3
Descrizione
### Context
When I have a POST body of type [file](https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#file):
```
post:
displayName: Upload an image
queryParameters:
filename:
required: false
type: string
(builtinType): string
headers:
Content-Type:
type: string
(builtinType): string
required: true
body:
type: file
fileTypes:
- "image/jpeg"
- "image/png"
- "image/gif"
```
### Current behavior
The RAML Doc generator turns it to `application/json`:
```
body:
application/json:
fileTypes:
- "image/jpeg"
- "image/png"
- "image/gif"
type: file
(builtinType): file
```
### Expected behavior
The type stays as it was:
```
body:
type: file
fileTypes:
- "image/jpeg"
- "image/png"
- "image/gif"
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo il RAML Doc generator con il POST body example e traccia come un file body viene convertito nella generated body representation. La correzione è completata quando l'output preserva il tipo: file e le relative voci fileTypes, invece di introdurre application/json; aggiungi o aggiorna la coverage per questo esempio se il generator ha già dei test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- kotlin
- Ambito
- backend-api-design, tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100