diff --git a/cloud/docker-image/pom.xml b/cloud/docker-image/pom.xml
index dda2c6b6a5..0b37392348 100644
--- a/cloud/docker-image/pom.xml
+++ b/cloud/docker-image/pom.xml
@@ -199,12 +199,6 @@
${project.version}
runtime
-
- ${project.groupId}
- command-generate
- ${project.version}
- runtime
-
${project.groupId}
command-metrics
diff --git a/cloud/docker-image/src/main/docker/zpm.json.template b/cloud/docker-image/src/main/docker/zpm.json.template
index 392e048a10..46961f11bb 100644
--- a/cloud/docker-image/src/main/docker/zpm.json.template
+++ b/cloud/docker-image/src/main/docker/zpm.json.template
@@ -42,7 +42,6 @@
"io.aklivity.zilla:common",
"io.aklivity.zilla:command",
"io.aklivity.zilla:command-dump",
- "io.aklivity.zilla:command-generate",
"io.aklivity.zilla:command-metrics",
"io.aklivity.zilla:command-start",
"io.aklivity.zilla:command-stop",
diff --git a/incubator/command-generate/COPYRIGHT b/incubator/command-generate/COPYRIGHT
deleted file mode 100644
index 0cb10b6f62..0000000000
--- a/incubator/command-generate/COPYRIGHT
+++ /dev/null
@@ -1,12 +0,0 @@
-Copyright ${copyrightYears} Aklivity Inc
-
-Licensed under the Aklivity Community License (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- https://www.aklivity.io/aklivity-community-license/
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
diff --git a/incubator/command-generate/LICENSE b/incubator/command-generate/LICENSE
deleted file mode 100644
index f6abb6327b..0000000000
--- a/incubator/command-generate/LICENSE
+++ /dev/null
@@ -1,114 +0,0 @@
- Aklivity Community License Agreement
- Version 1.0
-
-This Aklivity Community License Agreement Version 1.0 (the “Agreement”) sets
-forth the terms on which Aklivity, Inc. (“Aklivity”) makes available certain
-software made available by Aklivity under this Agreement (the “Software”). BY
-INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY OF THE SOFTWARE,
-YOU AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO
-SUCH TERMS AND CONDITIONS, YOU MUST NOT USE THE SOFTWARE. IF YOU ARE RECEIVING
-THE SOFTWARE ON BEHALF OF A LEGAL ENTITY, YOU REPRESENT AND WARRANT THAT YOU
-HAVE THE ACTUAL AUTHORITY TO AGREE TO THE TERMS AND CONDITIONS OF THIS
-AGREEMENT ON BEHALF OF SUCH ENTITY. “Licensee” means you, an individual, or
-the entity on whose behalf you are receiving the Software.
-
- 1. LICENSE GRANT AND CONDITIONS.
-
- 1.1 License. Subject to the terms and conditions of this Agreement,
- Aklivity hereby grants to Licensee a non-exclusive, royalty-free,
- worldwide, non-transferable, non-sublicenseable license during the term
- of this Agreement to: (a) use the Software; (b) prepare modifications and
- derivative works of the Software; (c) distribute the Software (including
- without limitation in source code or object code form); and (d) reproduce
- copies of the Software (the “License”). Licensee is not granted the
- right to, and Licensee shall not, exercise the License for an Excluded
- Purpose. For purposes of this Agreement, “Excluded Purpose” means making
- available any software-as-a-service, platform-as-a-service,
- infrastructure-as-a-service or other similar online service that competes
- with Aklivity products or services that provide the Software.
-
- 1.2 Conditions. In consideration of the License, Licensee’s distribution
- of the Software is subject to the following conditions:
-
- (a) Licensee must cause any Software modified by Licensee to carry
- prominent notices stating that Licensee modified the Software.
-
- (b) On each Software copy, Licensee shall reproduce and not remove or
- alter all Aklivity or third party copyright or other proprietary
- notices contained in the Software, and Licensee must provide the
- notice below with each copy.
-
- “This software is made available by Aklivity, Inc., under the
- terms of the Aklivity Community License Agreement, Version 1.0
- located at http://www.Aklivity.io/Aklivity-community-license. BY
- INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY OF
- THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT.”
-
- 1.3 Licensee Modifications. Licensee may add its own copyright notices
- to modifications made by Licensee and may provide additional or different
- license terms and conditions for use, reproduction, or distribution of
- Licensee’s modifications. While redistributing the Software or
- modifications thereof, Licensee may choose to offer, for a fee or free of
- charge, support, warranty, indemnity, or other obligations. Licensee, and
- not Aklivity, will be responsible for any such obligations.
-
- 1.4 No Sublicensing. The License does not include the right to
- sublicense the Software, however, each recipient to which Licensee
- provides the Software may exercise the Licenses so long as such recipient
- agrees to the terms and conditions of this Agreement.
-
- 2. TERM AND TERMINATION. This Agreement will continue unless and until
- earlier terminated as set forth herein. If Licensee breaches any of its
- conditions or obligations under this Agreement, this Agreement will
- terminate automatically and the License will terminate automatically and
- permanently.
-
- 3. INTELLECTUAL PROPERTY. As between the parties, Aklivity will retain all
- right, title, and interest in the Software, and all intellectual property
- rights therein. Aklivity hereby reserves all rights not expressly granted
- to Licensee in this Agreement. Aklivity hereby reserves all rights in its
- trademarks and service marks, and no licenses therein are granted in this
- Agreement.
-
- 4. DISCLAIMER. Aklivity HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND
- CONDITIONS, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND SPECIFICALLY
- DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
- PURPOSE, WITH RESPECT TO THE SOFTWARE.
-
- 5. LIMITATION OF LIABILITY. Aklivity WILL NOT BE LIABLE FOR ANY DAMAGES OF
- ANY KIND, INCLUDING BUT NOT LIMITED TO, LOST PROFITS OR ANY CONSEQUENTIAL,
- SPECIAL, INCIDENTAL, INDIRECT, OR DIRECT DAMAGES, HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, ARISING OUT OF THIS AGREEMENT. THE FOREGOING SHALL
- APPLY TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-
- 6.GENERAL.
-
- 6.1 Governing Law. This Agreement will be governed by and interpreted in
- accordance with the laws of the state of California, without reference to
- its conflict of laws principles. If Licensee is located within the
- United States, all disputes arising out of this Agreement are subject to
- the exclusive jurisdiction of courts located in Santa Clara County,
- California. USA. If Licensee is located outside of the United States,
- any dispute, controversy or claim arising out of or relating to this
- Agreement will be referred to and finally determined by arbitration in
- accordance with the JAMS International Arbitration Rules. The tribunal
- will consist of one arbitrator. The place of arbitration will be Palo
- Alto, California. The language to be used in the arbitral proceedings
- will be English. Judgment upon the award rendered by the arbitrator may
- be entered in any court having jurisdiction thereof.
-
- 6.2 Assignment. Licensee is not authorized to assign its rights under
- this Agreement to any third party. Aklivity may freely assign its rights
- under this Agreement to any third party.
-
- 6.3 Other. This Agreement is the entire agreement between the parties
- regarding the subject matter hereof. No amendment or modification of
- this Agreement will be valid or binding upon the parties unless made in
- writing and signed by the duly authorized representatives of both
- parties. In the event that any provision, including without limitation
- any condition, of this Agreement is held to be unenforceable, this
- Agreement and all licenses and rights granted hereunder will immediately
- terminate. Waiver by Aklivity of a breach of any provision of this
- Agreement or the failure by Aklivity to exercise any right hereunder
- will not be construed as a waiver of any subsequent breach of that right
- or as a waiver of any other right.
\ No newline at end of file
diff --git a/incubator/command-generate/NOTICE b/incubator/command-generate/NOTICE
deleted file mode 100644
index 17478992e3..0000000000
--- a/incubator/command-generate/NOTICE
+++ /dev/null
@@ -1,18 +0,0 @@
-Licensed under the Aklivity Community License (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- https://www.aklivity.io/aklivity-community-license/
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
-This project includes:
- Jackson-annotations under The Apache Software License, Version 2.0
- Jackson-core under The Apache Software License, Version 2.0
- jackson-databind under The Apache Software License, Version 2.0
- Jackson-dataformat-YAML under The Apache Software License, Version 2.0
- SnakeYAML under Apache License, Version 2.0
-
diff --git a/incubator/command-generate/NOTICE.template b/incubator/command-generate/NOTICE.template
deleted file mode 100644
index 209ca12f74..0000000000
--- a/incubator/command-generate/NOTICE.template
+++ /dev/null
@@ -1,13 +0,0 @@
-Licensed under the Aklivity Community License (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- https://www.aklivity.io/aklivity-community-license/
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
-This project includes:
-#GENERATED_NOTICES#
diff --git a/incubator/command-generate/mvnw b/incubator/command-generate/mvnw
deleted file mode 100755
index d2f0ea3808..0000000000
--- a/incubator/command-generate/mvnw
+++ /dev/null
@@ -1,310 +0,0 @@
-#!/bin/sh
-# ----------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
-#
-# Required ENV vars:
-# ------------------
-# JAVA_HOME - location of a JDK home dir
-#
-# Optional ENV vars
-# -----------------
-# M2_HOME - location of maven2's installed home dir
-# MAVEN_OPTS - parameters passed to the Java VM when running Maven
-# e.g. to debug Maven itself, use
-# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
-
-if [ -z "$MAVEN_SKIP_RC" ] ; then
-
- if [ -f /etc/mavenrc ] ; then
- . /etc/mavenrc
- fi
-
- if [ -f "$HOME/.mavenrc" ] ; then
- . "$HOME/.mavenrc"
- fi
-
-fi
-
-# OS specific support. $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-mingw=false
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- MINGW*) mingw=true;;
- Darwin*) darwin=true
- # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
- # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
- if [ -z "$JAVA_HOME" ]; then
- if [ -x "/usr/libexec/java_home" ]; then
- export JAVA_HOME="`/usr/libexec/java_home`"
- else
- export JAVA_HOME="/Library/Java/Home"
- fi
- fi
- ;;
-esac
-
-if [ -z "$JAVA_HOME" ] ; then
- if [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=`java-config --jre-home`
- fi
-fi
-
-if [ -z "$M2_HOME" ] ; then
- ## resolve links - $0 may be a link to maven's home
- PRG="$0"
-
- # need this for relative symlinks
- while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
- done
-
- saveddir=`pwd`
-
- M2_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- M2_HOME=`cd "$M2_HOME" && pwd`
-
- cd "$saveddir"
- # echo Using m2 at $M2_HOME
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --unix "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For Mingw, ensure paths are in UNIX format before anything is touched
-if $mingw ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME="`(cd "$M2_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
-fi
-
-if [ -z "$JAVA_HOME" ]; then
- javaExecutable="`which javac`"
- if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
- # readlink(1) is not available as standard on Solaris 10.
- readLink=`which readlink`
- if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
- if $darwin ; then
- javaHome="`dirname \"$javaExecutable\"`"
- javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
- else
- javaExecutable="`readlink -f \"$javaExecutable\"`"
- fi
- javaHome="`dirname \"$javaExecutable\"`"
- javaHome=`expr "$javaHome" : '\(.*\)/bin'`
- JAVA_HOME="$javaHome"
- export JAVA_HOME
- fi
- fi
-fi
-
-if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD="`which java`"
- fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly." >&2
- echo " We cannot execute $JAVACMD" >&2
- exit 1
-fi
-
-if [ -z "$JAVA_HOME" ] ; then
- echo "Warning: JAVA_HOME environment variable is not set."
-fi
-
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
-
-# traverses directory structure from process work directory to filesystem root
-# first directory with .mvn subdirectory is considered project base directory
-find_maven_basedir() {
-
- if [ -z "$1" ]
- then
- echo "Path not specified to find_maven_basedir"
- return 1
- fi
-
- basedir="$1"
- wdir="$1"
- while [ "$wdir" != '/' ] ; do
- if [ -d "$wdir"/.mvn ] ; then
- basedir=$wdir
- break
- fi
- # workaround for JBEAP-8937 (on Solaris 10/Sparc)
- if [ -d "${wdir}" ]; then
- wdir=`cd "$wdir/.."; pwd`
- fi
- # end of workaround
- done
- echo "${basedir}"
-}
-
-# concatenates all lines of a file
-concat_lines() {
- if [ -f "$1" ]; then
- echo "$(tr -s '\n' ' ' < "$1")"
- fi
-}
-
-BASE_DIR=`find_maven_basedir "$(pwd)"`
-if [ -z "$BASE_DIR" ]; then
- exit 1;
-fi
-
-##########################################################################################
-# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-# This allows using the maven wrapper in projects that prohibit checking in binary data.
-##########################################################################################
-if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found .mvn/wrapper/maven-wrapper.jar"
- fi
-else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
- fi
- if [ -n "$MVNW_REPOURL" ]; then
- jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
- else
- jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
- fi
- while IFS="=" read key value; do
- case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
- esac
- done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Downloading from: $jarUrl"
- fi
- wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
- if $cygwin; then
- wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
- fi
-
- if command -v wget > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found wget ... using wget"
- fi
- if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- wget "$jarUrl" -O "$wrapperJarPath"
- else
- wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
- fi
- elif command -v curl > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found curl ... using curl"
- fi
- if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- curl -o "$wrapperJarPath" "$jarUrl" -f
- else
- curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
- fi
-
- else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Falling back to using Java to download"
- fi
- javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
- # For Cygwin, switch paths to Windows format before running javac
- if $cygwin; then
- javaClass=`cygpath --path --windows "$javaClass"`
- fi
- if [ -e "$javaClass" ]; then
- if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Compiling MavenWrapperDownloader.java ..."
- fi
- # Compiling the Java class
- ("$JAVA_HOME/bin/javac" "$javaClass")
- fi
- if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- # Running the downloader
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Running MavenWrapperDownloader.java ..."
- fi
- ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
- fi
- fi
- fi
-fi
-##########################################################################################
-# End of extension
-##########################################################################################
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-if [ "$MVNW_VERBOSE" = true ]; then
- echo $MAVEN_PROJECTBASEDIR
-fi
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --path --windows "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- [ -n "$MAVEN_PROJECTBASEDIR" ] &&
- MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
-fi
-
-# Provide a "standardized" way to retrieve the CLI args that will
-# work with both Windows and non-Windows executions.
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
-export MAVEN_CMD_LINE_ARGS
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/incubator/command-generate/mvnw.cmd b/incubator/command-generate/mvnw.cmd
deleted file mode 100644
index b26ab24f03..0000000000
--- a/incubator/command-generate/mvnw.cmd
+++ /dev/null
@@ -1,182 +0,0 @@
-@REM ----------------------------------------------------------------------------
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM ----------------------------------------------------------------------------
-
-@REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script
-@REM
-@REM Required ENV vars:
-@REM JAVA_HOME - location of a JDK home dir
-@REM
-@REM Optional ENV vars
-@REM M2_HOME - location of maven2's installed home dir
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
-@REM e.g. to debug Maven itself, use
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-@REM ----------------------------------------------------------------------------
-
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
-@echo off
-@REM set title of command window
-title %0
-@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
-@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
-
-@REM set %HOME% to equivalent of $HOME
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
-
-@REM Execute a user defined script before this one
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
-:skipRcPre
-
-@setlocal
-
-set ERROR_CODE=0
-
-@REM To isolate internal variables from possible post scripts, we use another setlocal
-@setlocal
-
-@REM ==== START VALIDATION ====
-if not "%JAVA_HOME%" == "" goto OkJHome
-
-echo.
-echo Error: JAVA_HOME not found in your environment. >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-:OkJHome
-if exist "%JAVA_HOME%\bin\java.exe" goto init
-
-echo.
-echo Error: JAVA_HOME is set to an invalid directory. >&2
-echo JAVA_HOME = "%JAVA_HOME%" >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-@REM ==== END VALIDATION ====
-
-:init
-
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
-@REM Fallback to current working directory if not found.
-
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
-
-set EXEC_DIR=%CD%
-set WDIR=%EXEC_DIR%
-:findBaseDir
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
-cd ..
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
-set WDIR=%CD%
-goto findBaseDir
-
-:baseDirFound
-set MAVEN_PROJECTBASEDIR=%WDIR%
-cd "%EXEC_DIR%"
-goto endDetectBaseDir
-
-:baseDirNotFound
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
-cd "%EXEC_DIR%"
-
-:endDetectBaseDir
-
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
-
-@setlocal EnableExtensions EnableDelayedExpansion
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
-
-:endReadAdditionalConfig
-
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
-
-FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
- IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
-)
-
-@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
-if exist %WRAPPER_JAR% (
- if "%MVNW_VERBOSE%" == "true" (
- echo Found %WRAPPER_JAR%
- )
-) else (
- if not "%MVNW_REPOURL%" == "" (
- SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
- )
- if "%MVNW_VERBOSE%" == "true" (
- echo Couldn't find %WRAPPER_JAR%, downloading it ...
- echo Downloading from: %DOWNLOAD_URL%
- )
-
- powershell -Command "&{"^
- "$webclient = new-object System.Net.WebClient;"^
- "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
- "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
- "}"^
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
- "}"
- if "%MVNW_VERBOSE%" == "true" (
- echo Finished downloading %WRAPPER_JAR%
- )
-)
-@REM End of extension
-
-@REM Provide a "standardized" way to retrieve the CLI args that will
-@REM work with both Windows and non-Windows executions.
-set MAVEN_CMD_LINE_ARGS=%*
-
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-
-exit /B %ERROR_CODE%
diff --git a/incubator/command-generate/pom.xml b/incubator/command-generate/pom.xml
deleted file mode 100644
index 3ea2a400e7..0000000000
--- a/incubator/command-generate/pom.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-
-
-
- 4.0.0
-
- io.aklivity.zilla
- incubator
- develop-SNAPSHOT
- ../pom.xml
-
-
- command-generate
- zilla::incubator::command-generate
-
-
-
- Aklivity Community License Agreement
- https://www.aklivity.io/aklivity-community-license/
- repo
-
-
-
-
- 11
- 11
- 0.60
- 4
-
-
-
-
- ${project.groupId}
- engine.spec
- ${project.version}
- provided
-
-
- ${project.groupId}
- engine
- ${project.version}
- provided
-
-
- ${project.groupId}
- command
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- binding-http
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- binding-mqtt
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- binding-tcp
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- binding-tls
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- guard-jwt
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- catalog-inline
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- model-avro
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- model-core
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- model-json
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- model-protobuf
- ${project.version}
- provided
-
-
- io.aklivity.zilla
- vault-filesystem
- ${project.version}
- provided
-
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-yaml
- 2.16.1
-
-
- org.junit.jupiter
- junit-jupiter-engine
- test
-
-
-
-
-
-
- org.jasig.maven
- maven-notice-plugin
-
-
- com.mycila
- license-maven-plugin
-
-
- src/test/resources/io/aklivity/zilla/runtime/command/generate/internal/openapi/**/*
- src/test/resources/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/**/*
-
-
-
-
- maven-checkstyle-plugin
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.moditect
- moditect-maven-plugin
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
- org.jacoco
- jacoco-maven-plugin
-
-
- io/aklivity/zilla/runtime/command/generate/internal/types/**/*.class
- io/aklivity/zilla/runtime/command/generate/internal/openapi/model/*.class
- io/aklivity/zilla/runtime/command/generate/internal/openapi/model2/*.class
- io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/*.class
- io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model2/*.class
-
-
-
- BUNDLE
-
-
- INSTRUCTION
- COVEREDRATIO
- ${jacoco.coverage.ratio}
-
-
- CLASS
- MISSEDCOUNT
- ${jacoco.missed.count}
-
-
-
-
-
-
-
- ${project.groupId}
- flyweight-maven-plugin
- ${project.version}
-
- core
- io.aklivity.zilla.runtime.command.generate.internal.types
-
-
-
-
- generate
-
-
-
-
-
-
-
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/ZillaConfigCommandSpi.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/ZillaConfigCommandSpi.java
deleted file mode 100644
index eb2b22b544..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/ZillaConfigCommandSpi.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal;
-
-import com.github.rvesse.airline.builder.CliBuilder;
-
-import io.aklivity.zilla.runtime.command.ZillaCommandSpi;
-import io.aklivity.zilla.runtime.command.generate.internal.airline.ZillaConfigCommand;
-import io.aklivity.zilla.runtime.common.feature.Incubating;
-
-@Incubating
-public class ZillaConfigCommandSpi implements ZillaCommandSpi
-{
- @Override
- public void mixin(
- CliBuilder builder)
- {
- builder.withCommand(ZillaConfigCommand.class);
- }
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ConfigGenerator.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ConfigGenerator.java
deleted file mode 100644
index 836a0d113e..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ConfigGenerator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.airline;
-
-import static org.agrona.LangUtil.rethrowUnchecked;
-
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import jakarta.json.bind.Jsonb;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
-
-import io.aklivity.zilla.runtime.engine.config.ModelConfig;
-import io.aklivity.zilla.runtime.model.core.config.Int32ModelConfig;
-import io.aklivity.zilla.runtime.model.core.config.StringModelConfig;
-
-public abstract class ConfigGenerator
-{
- protected static final String INLINE_CATALOG_NAME = "catalog0";
- protected static final String INLINE_CATALOG_TYPE = "inline";
- protected static final String APPLICATION_JSON = "application/json";
- protected static final String VERSION_LATEST = "latest";
- protected static final Pattern JSON_CONTENT_TYPE = Pattern.compile("^application/(?:.+\\+)?json$");
-
- protected final Map models = Map.of(
- "string", StringModelConfig.builder().build(),
- "integer", Int32ModelConfig.builder().build()
- );
- protected final Matcher jsonContentType = JSON_CONTENT_TYPE.matcher("");
-
- public abstract String generate();
-
- protected static String writeSchemaYaml(
- Jsonb jsonb,
- YAMLMapper yaml,
- Object schema)
- {
- String result = null;
- try
- {
- String schemaJson = jsonb.toJson(schema);
- JsonNode json = new ObjectMapper().readTree(schemaJson);
- result = yaml.writeValueAsString(json);
- }
- catch (JsonProcessingException ex)
- {
- rethrowUnchecked(ex);
- }
- return result;
- }
-
- protected final String unquoteEnvVars(
- String yaml,
- List unquotedEnvVars)
- {
- for (String envVar : unquotedEnvVars)
- {
- yaml = yaml.replaceAll(
- Pattern.quote(String.format("\"${{env.%s}}\"", envVar)),
- String.format("\\${{env.%s}}", envVar)
- );
- }
- return yaml;
- }
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ZillaConfigCommand.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ZillaConfigCommand.java
deleted file mode 100644
index c0a08a7400..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ZillaConfigCommand.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.airline;
-
-import static org.agrona.LangUtil.rethrowUnchecked;
-
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Map;
-import java.util.function.Function;
-
-import com.github.rvesse.airline.annotations.Command;
-import com.github.rvesse.airline.annotations.Option;
-import com.github.rvesse.airline.annotations.restrictions.AllowedValues;
-import com.github.rvesse.airline.annotations.restrictions.Required;
-
-import io.aklivity.zilla.runtime.command.ZillaCommand;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.http.proxy.AsyncApiHttpProxyConfigGenerator;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.mqtt.proxy.AsyncApiMqttProxyConfigGenerator;
-import io.aklivity.zilla.runtime.command.generate.internal.openapi.http.proxy.OpenApiHttpProxyConfigGenerator;
-
-@Command(name = "generate", description = "Generate configuration file")
-public final class ZillaConfigCommand extends ZillaCommand
-{
- private static final Map> GENERATORS = Map.of(
- "openapi.http.proxy", OpenApiHttpProxyConfigGenerator::new,
- "asyncapi.http.proxy", AsyncApiHttpProxyConfigGenerator::new,
- "asyncapi.mqtt.proxy", AsyncApiMqttProxyConfigGenerator::new
- );
-
- @Option(name = {"-t", "--template"},
- description = "Template name")
- @Required
- @AllowedValues(allowedValues = {
- "openapi.http.proxy",
- "asyncapi.http.proxy",
- "asyncapi.mqtt.proxy"
- })
- public String template;
-
- @Option(name = {"-i", "--input"},
- description = "Input filename",
- typeConverterProvider = ZillaConfigCommandPathConverterProvider.class)
- public Path input;
-
- @Option(name = {"-o", "--output"},
- description = "Output filename",
- typeConverterProvider = ZillaConfigCommandPathConverterProvider.class)
- public Path output = Paths.get("zilla.yaml");
-
- @Override
- public void run()
- {
- try (InputStream inputStream = new FileInputStream(input.toFile()))
- {
- ConfigGenerator generator = GENERATORS.get(template).apply(inputStream);
- Files.writeString(output, generator.generate());
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- rethrowUnchecked(ex);
- }
- }
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ZillaConfigCommandPathConverterProvider.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ZillaConfigCommandPathConverterProvider.java
deleted file mode 100644
index 403fdc7755..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/airline/ZillaConfigCommandPathConverterProvider.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.airline;
-
-import java.nio.file.Paths;
-
-import com.github.rvesse.airline.model.ArgumentsMetadata;
-import com.github.rvesse.airline.model.OptionMetadata;
-import com.github.rvesse.airline.parser.ParseState;
-import com.github.rvesse.airline.types.TypeConverter;
-import com.github.rvesse.airline.types.TypeConverterProvider;
-import com.github.rvesse.airline.types.numerics.NumericTypeConverter;
-
-public final class ZillaConfigCommandPathConverterProvider implements TypeConverterProvider
-{
- private final ZillaDumpCommandPathConverter converter = new ZillaDumpCommandPathConverter();
-
- private final class ZillaDumpCommandPathConverter implements TypeConverter
- {
- @Override
- public void setNumericConverter(
- NumericTypeConverter converter)
- {
- }
-
- @Override
- public Object convert(
- String name,
- Class> type,
- String value)
- {
- return Paths.get(value);
- }
- }
-
- @Override
- public TypeConverter getTypeConverter(
- OptionMetadata option,
- ParseState state)
- {
- return converter;
- }
-
- @Override
- public TypeConverter getTypeConverter(
- ArgumentsMetadata arguments,
- ParseState state)
- {
- return converter;
- }
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/AsyncApiConfigGenerator.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/AsyncApiConfigGenerator.java
deleted file mode 100644
index 243d29dcaa..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/AsyncApiConfigGenerator.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi;
-
-import static com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature.MINIMIZE_QUOTES;
-import static com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature.WRITE_DOC_START_MARKER;
-import static org.agrona.LangUtil.rethrowUnchecked;
-
-import java.util.Map;
-
-import jakarta.json.bind.Jsonb;
-import jakarta.json.bind.JsonbBuilder;
-
-import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
-
-import io.aklivity.zilla.runtime.catalog.inline.config.InlineOptionsConfig;
-import io.aklivity.zilla.runtime.catalog.inline.config.InlineSchemaConfigBuilder;
-import io.aklivity.zilla.runtime.command.generate.internal.airline.ConfigGenerator;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.AsyncApi;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.Message;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.Schema;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.view.MessageView;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.view.SchemaView;
-import io.aklivity.zilla.runtime.engine.config.NamespaceConfigBuilder;
-
-public abstract class AsyncApiConfigGenerator extends ConfigGenerator
-{
- protected AsyncApi asyncApi;
-
- protected boolean hasJsonContentType()
- {
- String contentType = null;
- if (asyncApi.components != null && asyncApi.components.messages != null && !asyncApi.components.messages.isEmpty())
- {
- Message firstMessage = asyncApi.components.messages.entrySet().stream().findFirst().get().getValue();
- contentType = MessageView.of(asyncApi.components.messages, firstMessage).contentType();
- }
- return contentType != null && jsonContentType.reset(contentType).matches();
- }
-
- protected NamespaceConfigBuilder injectCatalog(
- NamespaceConfigBuilder namespace)
- {
- if (asyncApi.components != null && asyncApi.components.schemas != null && !asyncApi.components.schemas.isEmpty())
- {
- namespace
- .catalog()
- .name(INLINE_CATALOG_NAME)
- .type(INLINE_CATALOG_TYPE)
- .options(InlineOptionsConfig::builder)
- .subjects()
- .inject(this::injectSubjects)
- .build()
- .build()
- .build();
-
- }
- return namespace;
- }
-
- protected InlineSchemaConfigBuilder injectSubjects(
- InlineSchemaConfigBuilder subjects)
- {
- try (Jsonb jsonb = JsonbBuilder.create())
- {
- YAMLMapper yaml = YAMLMapper.builder()
- .disable(WRITE_DOC_START_MARKER)
- .enable(MINIMIZE_QUOTES)
- .build();
- for (Map.Entry entry : asyncApi.components.schemas.entrySet())
- {
- SchemaView schema = SchemaView.of(asyncApi.components.schemas, entry.getValue());
- subjects
- .subject(entry.getKey())
- .version(VERSION_LATEST)
- .schema(writeSchemaYaml(jsonb, yaml, schema))
- .build();
- }
- }
- catch (Exception ex)
- {
- rethrowUnchecked(ex);
- }
- return subjects;
- }
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/http/proxy/AsyncApiHttpProxyConfigGenerator.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/http/proxy/AsyncApiHttpProxyConfigGenerator.java
deleted file mode 100644
index cba4f9c148..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/http/proxy/AsyncApiHttpProxyConfigGenerator.java
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.http.proxy;
-
-import static io.aklivity.zilla.runtime.binding.http.config.HttpPolicyConfig.CROSS_ORIGIN;
-import static io.aklivity.zilla.runtime.engine.config.KindConfig.CLIENT;
-import static io.aklivity.zilla.runtime.engine.config.KindConfig.SERVER;
-import static java.util.Objects.requireNonNull;
-import static org.agrona.LangUtil.rethrowUnchecked;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import jakarta.json.Json;
-import jakarta.json.JsonPatch;
-import jakarta.json.JsonPatchBuilder;
-import jakarta.json.bind.Jsonb;
-import jakarta.json.bind.JsonbBuilder;
-
-import io.aklivity.zilla.runtime.binding.http.config.HttpConditionConfig;
-import io.aklivity.zilla.runtime.binding.http.config.HttpOptionsConfig;
-import io.aklivity.zilla.runtime.binding.http.config.HttpOptionsConfigBuilder;
-import io.aklivity.zilla.runtime.binding.http.config.HttpRequestConfig.Method;
-import io.aklivity.zilla.runtime.binding.http.config.HttpRequestConfigBuilder;
-import io.aklivity.zilla.runtime.binding.tcp.config.TcpConditionConfig;
-import io.aklivity.zilla.runtime.binding.tcp.config.TcpOptionsConfig;
-import io.aklivity.zilla.runtime.binding.tls.config.TlsOptionsConfig;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.AsyncApiConfigGenerator;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.AsyncApi;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.Item;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.Message;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.Operation;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.Parameter;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model.Server;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.view.ChannelView;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.view.MessageView;
-import io.aklivity.zilla.runtime.command.generate.internal.asyncapi.view.ServerView;
-import io.aklivity.zilla.runtime.engine.config.BindingConfigBuilder;
-import io.aklivity.zilla.runtime.engine.config.CatalogedConfigBuilder;
-import io.aklivity.zilla.runtime.engine.config.EngineConfig;
-import io.aklivity.zilla.runtime.engine.config.EngineConfigWriter;
-import io.aklivity.zilla.runtime.engine.config.GuardedConfigBuilder;
-import io.aklivity.zilla.runtime.engine.config.ModelConfig;
-import io.aklivity.zilla.runtime.engine.config.NamespaceConfigBuilder;
-import io.aklivity.zilla.runtime.engine.config.RouteConfigBuilder;
-import io.aklivity.zilla.runtime.guard.jwt.config.JwtOptionsConfig;
-import io.aklivity.zilla.runtime.model.json.config.JsonModelConfig;
-import io.aklivity.zilla.runtime.vault.filesystem.config.FileSystemOptionsConfig;
-
-public class AsyncApiHttpProxyConfigGenerator extends AsyncApiConfigGenerator
-{
- private final InputStream input;
-
- private int[] allPorts;
- private int[] httpPorts;
- private int[] httpsPorts;
- private boolean isPlainEnabled;
- private boolean isTlsEnabled;
- private Map securitySchemes;
- private String authorizationHeader;
- private boolean isJwtEnabled;
-
- public AsyncApiHttpProxyConfigGenerator(
- InputStream input)
- {
- this.input = input;
- }
-
- @Override
- public String generate()
- {
- this.asyncApi = parseAsyncApi(input);
- this.allPorts = resolveAllPorts();
- this.httpPorts = resolvePortsForScheme("http");
- this.httpsPorts = resolvePortsForScheme("https");
- this.isPlainEnabled = httpPorts != null;
- this.isTlsEnabled = httpsPorts != null;
- this.securitySchemes = resolveSecuritySchemes();
- this.authorizationHeader = resolveAuthorizationHeader();
- this.isJwtEnabled = !securitySchemes.isEmpty();
- EngineConfigWriter configWriter = new EngineConfigWriter(null);
- String yaml = configWriter.write(createConfig(), createEnvVarsPatch());
- return unquoteEnvVars(yaml, unquotedEnvVars());
- }
-
- private AsyncApi parseAsyncApi(
- InputStream inputStream)
- {
- AsyncApi asyncApi = null;
- try (Jsonb jsonb = JsonbBuilder.create())
- {
- asyncApi = jsonb.fromJson(inputStream, AsyncApi.class);
- }
- catch (Exception ex)
- {
- rethrowUnchecked(ex);
- }
- return asyncApi;
- }
-
- private int[] resolveAllPorts()
- {
- int[] ports = new int[asyncApi.servers.size()];
- String[] keys = asyncApi.servers.keySet().toArray(String[]::new);
- for (int i = 0; i < asyncApi.servers.size(); i++)
- {
- ServerView server = ServerView.of(asyncApi.servers.get(keys[i]));
- URI url = server.url();
- ports[i] = url.getPort();
- }
- return ports;
- }
-
- private int[] resolvePortsForScheme(
- String scheme)
- {
- requireNonNull(scheme);
- int[] ports = null;
- URI url = findFirstServerUrlWithScheme(scheme);
- if (url != null)
- {
- ports = new int[] {url.getPort()};
- }
- return ports;
- }
-
- private URI findFirstServerUrlWithScheme(
- String scheme)
- {
- requireNonNull(scheme);
- URI result = null;
- for (String key : asyncApi.servers.keySet())
- {
- ServerView server = ServerView.of(asyncApi.servers.get(key));
- if (scheme.equals(server.url().getScheme()))
- {
- result = server.url();
- break;
- }
- }
- return result;
- }
-
- private Map resolveSecuritySchemes()
- {
- requireNonNull(asyncApi);
- Map result = new HashMap<>();
- if (asyncApi.components != null && asyncApi.components.securitySchemes != null)
- {
- for (String securitySchemeName : asyncApi.components.securitySchemes.keySet())
- {
- String guardType = asyncApi.components.securitySchemes.get(securitySchemeName).bearerFormat;
- if ("jwt".equals(guardType))
- {
- result.put(securitySchemeName, guardType);
- }
- }
- }
- return result;
- }
-
- private String resolveAuthorizationHeader()
- {
- requireNonNull(asyncApi);
- requireNonNull(asyncApi.components);
- String result = null;
- if (asyncApi.components.messages != null)
- {
- for (Map.Entry entry : asyncApi.components.messages.entrySet())
- {
- Message message = entry.getValue();
- if (message.headers != null && message.headers.properties != null)
- {
- Item authorization = message.headers.properties.get("authorization");
- if (authorization != null)
- {
- result = authorization.description;
- break;
- }
- }
- }
- }
- return result;
- }
-
- private EngineConfig createConfig()
- {
- return EngineConfig.builder()
- .namespace()
- .name("example")
- .binding()
- .name("tcp_server0")
- .type("tcp")
- .kind(SERVER)
- .options(TcpOptionsConfig::builder)
- .host("0.0.0.0")
- .ports(allPorts)
- .build()
- .inject(this::injectPlainTcpRoute)
- .inject(this::injectTlsTcpRoute)
- .build()
- .inject(this::injectTlsServer)
- .binding()
- .name("http_server0")
- .type("http")
- .kind(SERVER)
- .options(HttpOptionsConfig::builder)
- .access()
- .policy(CROSS_ORIGIN)
- .build()
- .inject(this::injectHttpServerOptions)
- .inject(this::injectHttpServerRequests)
- .build()
- .inject(this::injectHttpServerRoutes)
- .build()
- .binding()
- .name("http_client0")
- .type("http")
- .kind(CLIENT)
- .exit(isTlsEnabled ? "tls_client0" : "tcp_client0")
- .build()
- .inject(this::injectTlsClient)
- .binding()
- .name("tcp_client0")
- .type("tcp")
- .kind(CLIENT)
- .options(TcpOptionsConfig::builder)
- .host("") // env
- .ports(new int[]{0}) // env
- .build()
- .build()
- .inject(this::injectGuard)
- .inject(this::injectVaults)
- .inject(this::injectCatalog)
- .build()
- .build();
- }
-
- private BindingConfigBuilder injectPlainTcpRoute(
- BindingConfigBuilder binding)
- {
- if (isPlainEnabled)
- {
- binding
- .route()
- .when(TcpConditionConfig::builder)
- .ports(httpPorts)
- .build()
- .exit("http_server0")
- .build();
- }
- return binding;
- }
-
- private BindingConfigBuilder injectTlsTcpRoute(
- BindingConfigBuilder binding)
- {
- if (isTlsEnabled)
- {
- binding
- .route()
- .when(TcpConditionConfig::builder)
- .ports(httpsPorts)
- .build()
- .exit("tls_server0")
- .build();
- }
- return binding;
- }
-
- private NamespaceConfigBuilder injectTlsServer(
- NamespaceConfigBuilder namespace)
- {
- if (isTlsEnabled)
- {
- namespace
- .binding()
- .name("tls_server0")
- .type("tls")
- .kind(SERVER)
- .options(TlsOptionsConfig::builder)
- .keys(List.of("")) // env
- .sni(List.of("")) // env
- .alpn(List.of("")) // env
- .build()
- .vault("server")
- .exit("http_server0")
- .build();
- }
- return namespace;
- }
-
- private HttpOptionsConfigBuilder injectHttpServerOptions(
- HttpOptionsConfigBuilder options)
- {
- if (isJwtEnabled)
- {
- options
- .authorization()
- .name("jwt0")
- .credentials()
- .header()
- .name("authorization")
- .pattern(authorizationHeader)
- .build()
- .build()
- .build();
- }
- return options;
- }
-
- private HttpOptionsConfigBuilder injectHttpServerRequests(
- HttpOptionsConfigBuilder options)
- {
- for (String name : asyncApi.operations.keySet())
- {
- Operation operation = asyncApi.operations.get(name);
- ChannelView channel = ChannelView.of(asyncApi.channels, operation.channel);
- String path = channel.address();
- Method method = Method.valueOf(operation.bindings.get("http").method);
- if (channel.messages() != null && !channel.messages().isEmpty() ||
- channel.parameters() != null && !channel.parameters().isEmpty())
- {
- options
- .request()
- .path(path)
- .method(method)
- .inject(request -> injectContent(request, channel.messages()))
- .inject(request -> injectPathParams(request, channel.parameters()))
- .build();
- }
- }
- return options;
- }
-
- private HttpRequestConfigBuilder injectContent(
- HttpRequestConfigBuilder request,
- Map messages)
- {
- if (messages != null)
- {
- if (hasJsonContentType())
- {
- request.
- content(JsonModelConfig::builder)
- .catalog()
- .name(INLINE_CATALOG_NAME)
- .inject(catalog -> injectSchemas(catalog, messages))
- .build()
- .build();
- }
- }
- return request;
- }
-
- private CatalogedConfigBuilder injectSchemas(
- CatalogedConfigBuilder catalog,
- Map messages)
- {
- for (String name : messages.keySet())
- {
- MessageView message = MessageView.of(asyncApi.components.messages, messages.get(name));
- String subject = message.refKey() != null ? message.refKey() : name;
- catalog
- .schema()
- .subject(subject)
- .build()
- .build();
- }
- return catalog;
- }
-
- private HttpRequestConfigBuilder injectPathParams(
- HttpRequestConfigBuilder request,
- Map parameters)
- {
- if (parameters != null)
- {
- for (String name : parameters.keySet())
- {
- Parameter parameter = parameters.get(name);
- if (parameter.schema != null && parameter.schema.type != null)
- {
- ModelConfig model = models.get(parameter.schema.type);
- if (model != null)
- {
- request
- .pathParam()
- .name(name)
- .model(model)
- .build();
- }
- }
- }
- }
- return request;
- }
-
-
- private BindingConfigBuilder injectHttpServerRoutes(
- BindingConfigBuilder binding)
- {
- for (Map.Entry entry : asyncApi.servers.entrySet())
- {
- ServerView server = ServerView.of(entry.getValue());
- for (String name : asyncApi.operations.keySet())
- {
- Operation operation = asyncApi.operations.get(name);
- ChannelView channel = ChannelView.of(asyncApi.channels, operation.channel);
- String path = channel.address().replaceAll("\\{[^}]+\\}", "*");
- String method = operation.bindings.get("http").method;
- binding
- .route()
- .exit("http_client0")
- .when(HttpConditionConfig::builder)
- .header(":scheme", server.scheme())
- .header(":authority", server.authority())
- .header(":path", path)
- .header(":method", method)
- .build()
- .inject(route -> injectHttpServerRouteGuarded(route, server))
- .build();
- }
- }
- return binding;
- }
-
- private RouteConfigBuilder injectHttpServerRouteGuarded(
- RouteConfigBuilder route,
- ServerView server)
- {
- if (server.security() != null)
- {
- for (Map> securityItem : server.security())
- {
- for (String securityItemLabel : securityItem.keySet())
- {
- if (isJwtEnabled && "jwt".equals(securitySchemes.get(securityItemLabel)))
- {
- route
- .guarded()
- .name("jwt0")
- .inject(guarded -> injectGuardedRoles(guarded, securityItem.get(securityItemLabel)))
- .build();
- break;
- }
- }
- }
- }
- return route;
- }
-
- private GuardedConfigBuilder injectGuardedRoles(
- GuardedConfigBuilder guarded,
- List roles)
- {
- for (String role : roles)
- {
- guarded.role(role);
- }
- return guarded;
- }
-
- private NamespaceConfigBuilder injectTlsClient(
- NamespaceConfigBuilder namespace)
- {
- if (isTlsEnabled)
- {
- namespace
- .binding()
- .name("tls_client0")
- .type("tls")
- .kind(CLIENT)
- .options(TlsOptionsConfig::builder)
- .trust(List.of("")) // env
- .sni(List.of("")) // env
- .alpn(List.of("")) // env
- .trustcacerts(true)
- .build()
- .vault("client")
- .exit("tcp_client0")
- .build();
- }
- return namespace;
- }
-
- private NamespaceConfigBuilder injectGuard(
- NamespaceConfigBuilder namespace)
- {
- if (isJwtEnabled)
- {
- namespace
- .guard()
- .name("jwt0")
- .type("jwt")
- .options(JwtOptionsConfig::builder)
- .issuer("") // env
- .audience("") // env
- .key()
- .alg("").kty("").kid("").use("").n("").e("").crv("").x("").y("") // env
- .build()
- .build()
- .build();
- }
- return namespace;
- }
-
- private NamespaceConfigBuilder injectVaults(
- NamespaceConfigBuilder namespace)
- {
- if (isTlsEnabled)
- {
- namespace
- .vault()
- .name("client")
- .type("filesystem")
- .options(FileSystemOptionsConfig::builder)
- .trust()
- .store("") // env
- .type("") // env
- .password("") // env
- .build()
- .build()
- .build()
- .vault()
- .name("server")
- .type("filesystem")
- .options(FileSystemOptionsConfig::builder)
- .keys()
- .store("") // env
- .type("") // env
- .password("") //env
- .build()
- .build()
- .build();
- }
- return namespace;
- }
-
- private JsonPatch createEnvVarsPatch()
- {
- JsonPatchBuilder patch = Json.createPatchBuilder();
- patch.replace("/bindings/tcp_client0/options/host", "${{env.TCP_CLIENT_HOST}}");
- patch.replace("/bindings/tcp_client0/options/port", "${{env.TCP_CLIENT_PORT}}");
-
- if (isJwtEnabled)
- {
- // jwt0 guard
- patch.replace("/guards/jwt0/options/issuer", "${{env.JWT_ISSUER}}");
- patch.replace("/guards/jwt0/options/audience", "${{env.JWT_AUDIENCE}}");
- patch.replace("/guards/jwt0/options/keys/0/alg", "${{env.JWT_ALG}}");
- patch.replace("/guards/jwt0/options/keys/0/kty", "${{env.JWT_KTY}}");
- patch.replace("/guards/jwt0/options/keys/0/kid", "${{env.JWT_KID}}");
- patch.replace("/guards/jwt0/options/keys/0/use", "${{env.JWT_USE}}");
- patch.replace("/guards/jwt0/options/keys/0/n", "${{env.JWT_N}}");
- patch.replace("/guards/jwt0/options/keys/0/e", "${{env.JWT_E}}");
- patch.replace("/guards/jwt0/options/keys/0/crv", "${{env.JWT_CRV}}");
- patch.replace("/guards/jwt0/options/keys/0/x", "${{env.JWT_X}}");
- patch.replace("/guards/jwt0/options/keys/0/y", "${{env.JWT_Y}}");
- }
-
- if (isTlsEnabled)
- {
- // tls_server0 binding
- patch.replace("/bindings/tls_server0/options/keys/0", "${{env.TLS_SERVER_KEY}}");
- patch.replace("/bindings/tls_server0/options/sni/0", "${{env.TLS_SERVER_SNI}}");
- patch.replace("/bindings/tls_server0/options/alpn/0", "${{env.TLS_SERVER_ALPN}}");
- // tls_client0 binding
- patch.replace("/bindings/tls_client0/options/trust/0", "${{env.TLS_CLIENT_TRUST}}");
- patch.replace("/bindings/tls_client0/options/sni/0", "${{env.TLS_CLIENT_SNI}}");
- patch.replace("/bindings/tls_client0/options/alpn/0", "${{env.TLS_CLIENT_ALPN}}");
- // client vault
- patch.replace("/vaults/client/options/trust/store", "${{env.TRUSTSTORE_PATH}}");
- patch.replace("/vaults/client/options/trust/type", "${{env.TRUSTSTORE_TYPE}}");
- patch.replace("/vaults/client/options/trust/password", "${{env.TRUSTSTORE_PASSWORD}}");
- // server vault
- patch.replace("/vaults/server/options/keys/store", "${{env.KEYSTORE_PATH}}");
- patch.replace("/vaults/server/options/keys/type", "${{env.KEYSTORE_TYPE}}");
- patch.replace("/vaults/server/options/keys/password", "${{env.KEYSTORE_PASSWORD}}");
- }
-
- return patch.build();
- }
-
- private List unquotedEnvVars()
- {
- return List.of("TCP_CLIENT_PORT");
- }
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/AsyncApi.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/AsyncApi.java
deleted file mode 100644
index 3379ddefd8..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/AsyncApi.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-import java.util.Map;
-
-public class AsyncApi
-{
- public Map servers;
- public Map channels;
- public Map operations;
- public Components components;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Binding.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Binding.java
deleted file mode 100644
index 0e15d732e4..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Binding.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-public class Binding
-{
- public String method;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Channel.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Channel.java
deleted file mode 100644
index 29ed4bc9e0..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Channel.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-import java.util.LinkedHashMap;
-
-import jakarta.json.bind.annotation.JsonbProperty;
-
-public class Channel
-{
- public String address;
- public LinkedHashMap messages;
- public LinkedHashMap parameters;
-
- @JsonbProperty("$ref")
- public String ref;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Components.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Components.java
deleted file mode 100644
index 9288e3e2a6..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Components.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-import java.util.Map;
-
-import io.aklivity.zilla.runtime.command.generate.internal.openapi.model.SecurityScheme;
-
-public class Components
-{
- public Map securitySchemes;
- public Map messages;
- public Map schemas;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Item.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Item.java
deleted file mode 100644
index 42ed3d6c2d..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Item.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-public class Item
-{
- public String type;
- public String description;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Message.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Message.java
deleted file mode 100644
index 18011a28f6..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Message.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-import jakarta.json.bind.annotation.JsonbProperty;
-
-public class Message
-{
- public Schema headers;
- public String contentType;
-
- @JsonbProperty("$ref")
- public String ref;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Operation.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Operation.java
deleted file mode 100644
index 89551a6cc0..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Operation.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-import java.util.Map;
-
-public class Operation
-{
- public Map bindings;
- public Channel channel;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Parameter.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Parameter.java
deleted file mode 100644
index 7048bf9784..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Parameter.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-public class Parameter
-{
- public Schema schema;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Schema.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Schema.java
deleted file mode 100644
index be52cda60e..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Schema.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-import java.util.List;
-import java.util.Map;
-
-import jakarta.json.bind.annotation.JsonbProperty;
-
-public class Schema
-{
- public String type;
- public Schema items;
- public Map properties;
- public List required;
-
- @JsonbProperty("$ref")
- public String ref;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/SecurityScheme.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/SecurityScheme.java
deleted file mode 100644
index 137c290af5..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/SecurityScheme.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-public class SecurityScheme
-{
- public String bearerFormat;
-}
diff --git a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Server.java b/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Server.java
deleted file mode 100644
index 73e0eec68c..0000000000
--- a/incubator/command-generate/src/main/java/io/aklivity/zilla/runtime/command/generate/internal/asyncapi/model/Server.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2021-2023 Aklivity Inc
- *
- * Licensed under the Aklivity Community License (the "License"); you may not use
- * this file except in compliance with the License. You may obtain a copy of the
- * License at
- *
- * https://www.aklivity.io/aklivity-community-license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.aklivity.zilla.runtime.command.generate.internal.asyncapi.model;
-
-import java.util.List;
-import java.util.Map;
-
-public class Server
-{
- public String host;
- public List
-
- ${project.groupId}
- command-generate
- ${project.version}
-