swagger-api/swagger-codegen

Swagger Codegen does not generate validation information for typescript-angular2

Open

#6.410 geöffnet am 31. Aug. 2017

Auf GitHub ansehen
 (7 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)HTML (5.474 Forks)batch import
Client: TypeScriptEnhancement: Featurehelp wanted

Repository-Metriken

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

Beschreibung

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.

Contributor Guide