swagger-api/swagger-codegen

[Typescript-Fetch] Support for default params

开放

#3,641 创建于 2016年8月25日

 (6 条评论) (0 个反应) (0 位负责人)HTML (5,474 个派生)batch import
Client: TypeScriptEnhancement: Featurehelp wanted

仓库指标

星标
 (12,701 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南