FelipeAdorno / springdoc-with-contracts

Generate Request and Response Example by Spring Cloud Contract Tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

springdoc-with-contracts

This is a POC to generate springdoc-openapi Request/Response examples based on spring-cloud-contract.

How achieve this:

  1. Add @Operation annotation to RestService and set operationId with the folder and the name of the contract. operation

  2. Create SpringBootTest class extending MonkeyAPIDocumentationBase. operation

  3. Run the test and the openapi.json file will be generated on the openapi folder.

    operation

GET - Contract

operation

GET - Documentation

operation

About

Generate Request and Response Example by Spring Cloud Contract Tests


Languages

Language:Java 89.2%Language:Groovy 10.8%