Skip to content

Commit 65bad61

Browse files
etherealjoywing328
authored andcommitted
[Qt5 Server] Add Support for Qt5 server using QHttpEngine (OpenAPITools#322)
* Initial wiring to get the QHttpEngine Server running for Qt5 server * Add wiring for build environment * Add current generated files * Update README.md * Solved Build for Docker and Host Wired up main TODO : Route API call to handlers * Wire up routes * Wiring up routes update * Convert Path to QHttpEngine format * Rename some files * Extract query Parameters and path parameters * Removed pri file, Qt can read CMakeLists.txt * Initial support of deserialization * Adding initial support for response serialization * Setup simple signal handler to quite the server with Ctrl+C in a container and on the host * Remove unneeded function * Add executable permission to script and move from Debian to Alpine for Dockerfile * Add stringValue of missing types * Unify toJson'xxx' APIs the same way like setValue * Rework to remove all pointer usages, pass by const references, simplify model, add emit signals to default handlers
1 parent 77df3d6 commit 65bad61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5934
-0
lines changed

bin/cpp-qt5-server-petstore.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
while [ -h "$SCRIPT" ] ; do
7+
ls=`ls -ld "$SCRIPT"`
8+
link=`expr "$ls" : '.*-> \(.*\)$'`
9+
if expr "$link" : '/.*' > /dev/null; then
10+
SCRIPT="$link"
11+
else
12+
SCRIPT=`dirname "$SCRIPT"`/"$link"
13+
fi
14+
done
15+
16+
if [ ! -d "${APP_DIR}" ]; then
17+
APP_DIR=`dirname "$SCRIPT"`/..
18+
APP_DIR=`cd "${APP_DIR}"; pwd`
19+
fi
20+
21+
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
22+
23+
if [ ! -f "$executable" ]
24+
then
25+
mvn -B clean package
26+
fi
27+
28+
# if you've executed sbt assembly previously it will use that instead.
29+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30+
ags="generate -t modules/openapi-generator/src/main/resources/cpp-qt5-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-qt5-server -o samples/server/petstore/cpp-qt5-server $@"
31+
32+
java $JAVA_OPTS -jar $executable $ags

0 commit comments

Comments
 (0)