swagger-api/swagger-codegen

Deserialization failed due to change of property name

Open

#4.857 geöffnet am 26. Feb. 2017

Auf GitHub ansehen
 (4 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)HTML (5.474 Forks)batch import
Client: TypeScriptIssue: Bughelp wanted

Repository-Metriken

Stars
 (12.701 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

The issue is originally reported via https://github.com/swagger-api/swagger-codegen/issues/4805#issuecomment-280615622

For typescript-angular2:

"Request": {
                "device_type": {
                    "type": "string"
                },
            }
        },

generates:

export interface Request { 
    deviceType?: string;
}

The deserialization does not work as there's no mapping between deviceType and device_type (original attribute name in JSON)

Swagger-codegen version

latest master and 2.3.0

cc @Ondra09, @ataraxus, @Tifu

Contributor Guide