swagger-api/swagger-codegen

CodegenOperation isMemberPath()

オープン

#4,030 opened on 2016/10/18

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

Repository metrics

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

説明

Description

CodegenOperation methods isRestfulUpdate and isRestulDestroy has the condition of isMemberPath() which contains this login:

` if (pathParams.size() != 1) return false;

I believe it is valid for a REST call to contain multiple path param: eg. DELETE /org/{myOrg}/user/{myUser} and PATCH /org/{myOrg}/user/{myUser} (valid in my current model)

This is preventing me from properly using the isRestfulUpdate method within a mustache template.

Swagger-codegen version

2.2.1

Suggest a Fix

Remove the isMemberPath() references from the IsRestful* methods, or change condition to have if (pathParams.size() == 0) return false;

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