swagger-api/swagger-codegen

Swagger Codegen does not generate validation information for typescript-angular2

Open

#6,410 创建于 2017年8月31日

在 GitHub 查看
 (7 评论) (3 反应) (0 负责人)HTML (12,701 star) (5,474 fork)batch import
Client: TypeScriptEnhancement: Featurehelp wanted

描述

Description

I use swagger-codegen to generate an API for typescript-angular2.

The Swagger JSON file contains as well additional information. e.g. minLength, maxLength of a string:

"AppointmentViewModel": { "required": [ "Title" ], "type": "object", "properties": { "Id": { "format": "int32", "type": "integer" }, "Ansprechpartner": { "maxLength": 100, "minLength": 0, "type": "string" },

Issue: I cannot find this information (minLength,maxLength) in the generated code. Does swagger-coden for typescript-angular2 not support this or do is miss something?

Swagger-codegen version

2.2.3

Command line used for generation

java -jar ./swagger-codegen-cli-2.2.3.jar generate -i http://example.ch/swagger/docs/v1 -l typescript-angular2 -o ./src/api -DsupportES6=true -DmodelPropertyNaming=original

Steps to reproduce

Generate code with additional information like minLength, maxLength.

贡献者指南