Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support no-domain classes #6

Open
asteria277 opened this issue Aug 6, 2014 · 1 comment
Open

Support no-domain classes #6

asteria277 opened this issue Aug 6, 2014 · 1 comment

Comments

@asteria277
Copy link

Hi,

In my application I have a RestfulController that uses a no-domain class.
I cannot use the domain class directly because I need to do custom processing (field names and types, are different, ..). And I would like to avoid creating a fake domain object just for this.

But still I would like to use this plugin to document all my rest api.

So, do you think it would be a good idea to add functionality this plugin ?

Thanks

@muenchhausen
Copy link
Contributor

Your idea is reasonable. But it seems that grails.rest.RestfulController is tightly bound to Grails domain classes, so I am not sure if grails.rest.RestfulController is the right choice for this usecase.
You can have a look to the method addDomainAndControllerClass in class ApiDocumentationService: It is the "heart" of this plugin - still quite a simple method that extracts all information from the Domain class and RestfulController. I think, it shouldn't be a problem to create an additional simplified version of this method for your more general approach. How should a Controller look like? How should the documentation look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants