swagger-api/swagger-codegen

CodegenOperation isMemberPath()

Open

#4 030 ouverte le 18 oct. 2016

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)HTML (5 474 forks)batch import
Client: JavaIssue: Bughelp wanted

Métriques du dépôt

Stars
 (12 701 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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;

Guide contributeur