How do document Apache Camel Rest Endpoints using OpenApi or Swagger specification?


Step-by-Step guide

Add dependnacy in pom.xml

<version>3.14.0</version> <!-- Same as Camel Core -->


public class RestDsl extends RouteBuilder {
public void configure() throws Exception {
.dataFormatProperty("prettyPrint", "true")
.apiProperty("api.title", "Saggu.UK Camel Rest APIs")
.apiProperty("api.version", "1.0")

.responseMessage("200", "On good request")
.responseMessage("404", "For invalid city name")
.description("Get weather data for a given city")
.name("city").type(path).description("The name of the city e.g. London").dataType("string")




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to connect multiple Docker Containers?

Finale: The Beginning

YoungInnovations Weekly #201

Lever Weekly Report May 19 — May 26


Pulse and Node

Agave Development Update #4

READ/DOWNLOAD$# Arduino Sketches: Tools and Techniques for Programming Wizardry FULL BOOK PDF &…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jasvinder S Saggu

Jasvinder S Saggu

More from Medium

Sample code for IBM Event Streams Coding Challenge

Basic OOP for shavetail Louies — PART III [Inheritance | Composition | Encapsulation]

Evolve Database Using Liquibase

Encrypting and Decrypting a message using Symmetric Keys with Java, explained step-by-step with…