swagger-api/swagger-codegen

[Typescript-Fetch] Support for default params

Open

#3641 aperta il 25 ago 2016

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)HTML (5474 fork)batch import
Client: TypeScriptEnhancement: Featurehelp wanted

Metriche repository

Star
 (12.701 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

Typescript-Fetch does not currently generate any code to help with default parameters in methods, but Typescript and ES6 have support for default parameters.

Implementing default parameters can help improve the usability of generated specs.

Swagger-codegen version

2.2.1

Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues
Suggest a Fix

It appears that the defaultValue helper exists to help solve this problem.

{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}

Guida contributor