swagger-api/swagger-codegen

CodegenOperation isMemberPath()

開放

#4,030 建立於 2016年10月18日

 (2 則留言) (0 個反應) (0 位負責人)HTML (5,474 個分叉)batch import
Client: JavaIssue: Bughelp wanted

倉庫指標

星標
 (12,701 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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;

貢獻者指南