ScaCap / spring-auto-restdocs

Spring Auto REST Docs is an extension to Spring REST Docs
https://scacap.github.io/spring-auto-restdocs/
Apache License 2.0
310 stars 86 forks source link

Ommit wrapper class in response fields #414

Closed dekar91 closed 2 years ago

dekar91 commented 4 years ago

Hi! Let assume we use JSON:API implementation JsonResponse for response. Response will look like:

{
data: {
   // DTO fields
},
erros: [],
meta: {}
}

In such case fields data, errors and meta will be included into snipped, but actually describle JSON:API contract separatly. Is there a way include only generic class into snipped?

jmisur commented 4 years ago

Hi @dekar91, we currently don't support JSON:API or similar specs. All response entities are taken at face value as custom response types of the project. Feel free to raise a PR for JSON:API.