-
Notifications
You must be signed in to change notification settings - Fork 201
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
Interface types are documented as "Object" #561
Comments
Interfaces aren't data types, so Enunciate doesn't document them as such. Maybe another way to say it is that there is no such thing as an "interface" in a Web service API. It's a construct specific to the language that doesn't translate to HTTP, SOAP, REST, XML, JSON, etc. So since Enunciate is documenting the Web service API, it's limited to the vocabulary of Web services and has no way of documenting an "interface." |
See also #551. |
Sure, but Java allows to define an interface type and use it as parameter or return type for services that Enunciate documents. So when I'm doing this : public interface ISomething { }
public class SomethingImpl implements ISomething { }
public class AnotherImpl implements ISomething { }
@Path("/service")
public interface IService {
@POST
@Path("/execute")
public ISomething doWork(ISomething input);
} Enunciate shows parameter and return type of /service/execute as "Object" (or Array of Object if using a collection of ISomething). @typehint or @returnWrapped won't help : any implementation can be a valid value. |
I started looking into this. It's a reasonable idea, but it's quite a bit of work, so I'm pulling it off the release plan for now. If anybody is willing to sponsor the work, reach out to me and I'd be happy to pick it up. |
Thanks to the support of a generous sponsor, this issue has been implemented and will be included in 2.9. |
Working on #557 I noticed that when a method returns a data type that is an interface, it is simply shown as Object. Interface types should be documented the same way as abstract parent types.
The text was updated successfully, but these errors were encountered: