forked from loafle/openapi-generator-original
Update java mustache to show error status codes and models in generated API, in comments.
* I wonder if there is some clever way to make exceptions based on the model thrown, and automatically fill them in with the parsed error models? * Until then, it's comments, and roll your own.
This commit is contained in:
@@ -27,6 +27,10 @@ public class {{classname}} {
|
||||
}
|
||||
|
||||
{{#operation}}
|
||||
{{#errorList}} //error info- code: {{code}} reason: "{{reason}}" model: {{#responseModel}}{{responseModel}}
|
||||
{{/responseModel}}{{^responseModel}}<none>
|
||||
{{/responseModel}}
|
||||
{{/errorList}}
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
{{#requiredParamCount}}
|
||||
// verify required params are set
|
||||
|
||||
@@ -30,6 +30,10 @@ public class {{classname}} {
|
||||
}
|
||||
|
||||
{{#operation}}
|
||||
{{#errorList}} //error info- code: {{code}} reason: "{{reason}}" model: {{#responseModel}}{{responseModel}}
|
||||
{{/responseModel}}{{^responseModel}}<none>
|
||||
{{/responseModel}}
|
||||
{{/errorList}}
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
{{#requiredParamCount}}
|
||||
// verify required params are set
|
||||
|
||||
Reference in New Issue
Block a user