loic911 / Rest-api-doc

MIT License
21 stars 32 forks source link

Documentation for custom UrlMappings #59

Open lguerin opened 9 years ago

lguerin commented 9 years ago

Documentation generated by the plugin for custom UrlMappings is not rendered correctly. For example:
UrlMappings

"/api/custom/$bookId/$action.$format" {
    controller = "restCustom"
    constraints {
        bookId nullable: false, blank: false
    }
}

RestCustomController

@RestApiMethod(description="Add a book to the store", verb = RestApiVerb.POST)
@RestApiParams(params=[
    @RestApiParam(name="bookId", type="long", paramType = RestApiParamType.PATH, description = "The book id")
])
def add(Long bookId) {
    ...
}

The generated documentation:

I have submitted the following pull request to fix the issue: https://github.com/loic911/Rest-api-doc/pull/58