kongchen/swagger-maven-plugin — pull request #74 by hutchiep190 (2014-07-28 14:40:23+00:00)
Title: Include enumerated types and error responses

While trying to use this to generate an API document at work, I noticed that I couldn't get any info on response types other than the main one. Error response types didn't get documented on the API document and I couldn't access them. Also, enumerated types were not documented so it was unclear what values were expected when an enumerated type was used as the type of a field in a documented response.

This pull request adds both of those things.

### Error Responses

Now you can get error response types like this (similar to the field types):
```mustache
{{#errorResponses}}
{{code}} | {{message}} | {{#linkType}}[{{type}}](#{{linkType}}){{/linkType}}{{^linkType}}{{#type}}{{{type}}}{{/type}}{{^type}}-{{/type}}{{/linkType}}
{{/errorResponses}}
```

In my own markdown.mustache I used this to fallback to the default response class when there was no given error type:
```mustache
{{code}} | {{message}} | {{#linkType}}[{{type}}](#{{linkType}}){{/linkType}}{{^linkType}}{{#type}}{{{type}}}{{/type}}{{^type}}{{#responseClass}}[{{className}}](#{{classLinkName}}){{/responseClass}}{{/type}}{{/linkType}}
```

### Enumerated Types

Access enumerated types with
```mustache
{{#enumTypes}}
## {{name}}
{{#allowableValues}}
{{.}}
{{/allowableValues}}
{{/enumTypes}}
```