Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.62 KB

File metadata and controls

44 lines (35 loc) · 1.62 KB

Camel Catalog Schema Generator

Maven Central Test

This package contains the Maven generator mojo used to convert the Camel Catalog into a JSON object that can be consumed by JavaScript clients.

Specifying Camel version

The version of Camel Catalog to be generated is specified by the org.apache.camel:camel-catalog dependency in your project's POM.

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-catalog</artifactId>
    <version>4.0.1</version>
</dependency>

Generating model

The mojo should be called from your project's POM as such:

<plugin>
    <groupId>io.hawt</groupId>
    <artifactId>camel-catalog-generator-plugin</artifactId>
    <version>1.0.0</version>
    <executions>
        <execution>
            <id>generate-camel-model</id>
            <goals>
                <goal>generate-camel-model</goal>
            </goals>
            <configuration>
                <buildDir>.</buildDir>
                <schemaFile>camelModel.js</schemaFile>
            </configuration>
        </execution>
    </executions>
</plugin>

The result will be a file named camelModel.js generated in the build directory. This can be then consumed as a JavaScript source file in the client application.