Question

Problem: I have some java models being used both for request and response body on some endpoints. The thing is, on a specific request, I don't want to show all fields from that model; also, on the response, maybe I want to show completely different fields from that same model.

Question: Is this possible using Enunciate ? Or we just have to use the same model composition on both request and response ?

I've looked into this and found the Enunciate API Facets. However, haven't figured out how to exclude only some fields from the model. Other than this specific feature, for now I've found Enunciate to be extremely useful and nice to use. It also produces quite good looking docs. :)

Was it helpful?

Solution

Unfortunately, Enunciate's documentation engine isn't that sophisticated. There's no way to configure Enunciate to document which fields of a model should be populated based for a specific request (or response).

It would be nice feature though. Why don't you open up a JIRA issue so the request can get tracked?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top