简体   繁体   中英

Exclude certain response model fields from Enunciate docs

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. :)

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM