swagger-api/swagger-codegen

[Typescript-Fetch] Support for default params

オープン

#3,641 opened on 2016/08/25

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)HTML (5,474 件のフォーク)batch import
Client: TypeScriptEnhancement: Featurehelp wanted

Repository metrics

Stars
 (12,701 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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}}

コントリビューターガイド