{"action":"opened","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/701","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/701/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/701/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/701/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/701","id":71891785,"number":701,"title":"requiredParamCount not working","user":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-29T14:30:33Z","updated_at":"2015-04-29T14:30:33Z","closed_at":null,"body":"The following code block using `#requiredParamCount` does not seem to work in Java's and other languages' template:\r\n```\r\n    {{#requiredParamCount}}\r\n    // verify required params are set\r\n    if({{/requiredParamCount}}{{#requiredParams}} {{paramName}} == null {{#hasMore}}|| {{/hasMore}}{{/requiredParams}}{{#requiredParamCount}}) {\r\n       throw new ApiException(400, \"missing required params\");\r\n    }\r\n    {{/requiredParamCount}}\r\n```\r\nas this code block does not produce anything even thought the method has required parameter(s). For example, `updatePetWithForm` has a required parameter `petId` but there's no code generated for verifying the required parameter `petId`:\r\n```\r\npublic void updatePetWithForm (String petId, String name, String status) throws ApiException {\r\n    Object postBody = null;\r\n    \r\n\r\n    // create path and map variables\r\n    String path = \"/pet/{petId}\".replaceAll(\"\\\\{format\\\\}\",\"json\")\r\n      .replaceAll(\"\\\\{\" + \"petId\" + \"\\\\}\", apiInvoker.escapeString(petId.toString()));\r\n\r\n    // query params\r\n    Map<String, String> queryParams = new HashMap<String, String>();\r\n    Map<String, String> headerParams = new HashMap<String, String>();\r\n    Map<String, String> formParams = new HashMap<String, String>();\r\n```\r\n\r\nI can look into fixing `{{#requireParamCount}}` or use `{{#allParams}}{{#required}}` as a workaround"}}