Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Document how to use Spring REST Docs with the MockMVC Kotlin DSL

Aperta
#677 8 commenti 4 reazioni 0 assegnatari Vedi su GitHub

@zerobak13 ci sta già lavorando.

Dal 15/1/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
kotlin, spring
Ambito
documentation

Direzione di ricerca

Compare the Kotlin MockMvc DSL example with the Java-style MockMvc example in the issue, then inspect the existing Spring REST Docs documentation for the appropriate integration section. Document the Kotlin DSL usage and the conditions needed for snippets to be generated, using the examples as the reference for done.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type: documentation

Was trying to implement RestDocs MockMvc in our Kotlin project
However noticed that when using the MockMvc Kotlin DSL snippets were not generated
e.g.

    fun shouldReturnDefaultMessageKotlinDSL() {
        mockMvc.get("/hello")
        .andExpect {
            status { isOk }
            content {
                string(containsString("Hello, world!"))
            }
        }.andDo {
            print()
            document("home")
        }
    }

However using the java format did correctly generate
e.g.

fun shouldReturnDefaultMessage() {
this.mockMvc.perform(get("/hello"))
.andDo(print())
.andExpect(status().isOk)
.andExpect(content().string(containsString("Hello, world!")))
.andDo(document("home"))
}
Lingua principale
Java
Stelle
1.2k
Fork
733
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di spring-projects/spring-restdocs

Tutte le issue di spring-projects/spring-restdocs

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.