swagger-api/swagger-codegen

Deserialization failed due to change of property name

開放

#4,857 建立於 2017年2月26日

 (4 則留言) (5 個反應) (0 位負責人)HTML (5,474 個分叉)batch import
Client: TypeScriptIssue: Bughelp wanted

倉庫指標

星標
 (12,701 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南