<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/generate-all-enum-values-for-spring-rest-docs-documentation-5xhtgley3" -->

---
title: Generate all enum values for Spring REST Docs documentation
description: A quick tip showing how to automatically include all enum values in Spring REST Docs field descriptions. The example demonstrates documenting a REST endpoint...
canonical: https://daily.dev/posts/generate-all-enum-values-for-spring-rest-docs-documentation-5xhtgley3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Generate all enum values for Spring REST Docs documentation | daily.dev
og:description: A quick tip showing how to automatically include all enum values in Spring REST Docs field descriptions. The example demonstrates documenting a REST endpoint...
og:url: https://daily.dev/posts/generate-all-enum-values-for-spring-rest-docs-documentation-5xhtgley3
og:image: https://api.daily.dev/og/posts/5XhtgleY3.png
og:image:alt: Generate all enum values for Spring REST Docs documentation
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate all enum values for Spring REST Docs documentation

**[Wim Deblauwe](https://daily.dev/sources/wim-deblauwe)** · 1 min read · 0 upvotes · 0 comments

## Summary

A quick tip showing how to automatically include all enum values in Spring REST Docs field descriptions. The example demonstrates documenting a REST endpoint response that contains an enum field (season), listing all possible values inline in the field description using MockMvc and Spring REST Docs annotations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.wimdeblauwe.com/blog/2020/06/08/generate-enum-values-spring-rest-docs/>

## Similar posts on daily.dev

- [Documenting Form Parameters With Spring REST Docs](https://daily.dev/posts/documenting-form-parameters-with-spring-rest-docs-hngqxpmip) · Baeldung · 0 upvotes · 0 comments
- [Document Your Spring REST APIs with Annotations](https://daily.dev/posts/document-your-spring-rest-apis-with-annotations-hhsdellg2) · Foojay.io · 21 upvotes · 0 comments
- [Spring REST Docs 4.0.0](https://daily.dev/posts/spring-rest-docs-4-0-0-gyg0dfibr) · Spring · 3 upvotes · 0 comments
- [OpenAPI tutorial: document and validate a REST API](https://daily.dev/posts/openapi-tutorial-document-and-validate-a-rest-api-kjyodzfup) · Flavio Copes · 1 upvotes · 1 comments

---

Tags: [#java](https://daily.dev/tags/java), [#backend](https://daily.dev/tags/backend), [#rest-api](https://daily.dev/tags/rest-api), [#spring-boot](https://daily.dev/tags/spring-boot)

[View this post on daily.dev](https://daily.dev/posts/generate-all-enum-values-for-spring-rest-docs-documentation-5xhtgley3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Generate all enum values for Spring REST Docs documentation","url":"https://daily.dev/posts/generate-all-enum-values-for-spring-rest-docs-documentation-5xhtgley3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/generate-all-enum-values-for-spring-rest-docs-documentation-5xhtgley3"},"datePublished":"2026-03-16T08:14:58.704Z","dateModified":"2026-03-16T08:23:56.452Z","description":"A quick tip showing how to automatically include all enum values in Spring REST Docs field descriptions. The example demonstrates documenting a REST endpoint...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/35ab4a9471903d8ad73479dc9a2cbf9b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/35ab4a9471903d8ad73479dc9a2cbf9b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Wim Deblauwe","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Wim Deblauwe","logo":"https://media.daily.dev/image/upload/s--g1qrglrf--/c_limit,w_256/f_auto,q_auto/v1773648779/logos/wim-deblauwe?_a=BAMAMiiu0","url":"https://daily.dev/sources/wim-deblauwe"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/generate-all-enum-values-for-spring-rest-docs-documentation-5xhtgley3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,backend,rest-api,spring-boot","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Wim Deblauwe","item":"https://daily.dev/sources/wim-deblauwe"},{"@type":"ListItem","position":3,"name":"Generate all enum values for Spring REST Docs documentation"}]}
```

