source: src/mapservice/codegen/code_generator@ bd0cb38

debian/bullseye
Last change on this file since bd0cb38 was bd0cb38, checked in by Joachim Langenbach <joachim.langenbach@…>, 7 years ago
  • Added license activated to User object and database table
  • Registering a user is now working
  • Property mode set to 100755
File size: 1.0 KB
Line 
1#!/bin/bash
2
3DIR=`dirname "$0"`
4SRC_GEN="${DIR}/../src-gen"
5TARGET="${SRC_GEN}/openapi_server/"
6
7echo "Cleaning directory"
8rm -R "${SRC_GEN}"
9
10echo "Preparing symlinks"
11mkdir -p "${TARGET}"
12cd "${TARGET}"
13if [ ! -L server_impl ]; then
14 ln -s ../../src/server_impl/
15fi
16
17#echo "Copying static files"
18#cp -a ../../src/templates ./
19#cp -a ../../src/static ./
20mkdir -p static/css/
21mkdir -p static/js/
22mkdir -p static/resources/
23cp -a ../../../common/css/* static/css/
24cp -a ../../../common/js/* static/js/
25cp -a ../../../common/resources/* static/resources/
26cp -a ../../../common/icon/* static/resources/
27mkdir -p templates
28cp -a ../../templates/* templates/
29
30echo "Generating backend and client API code"
31cd ../../
32# backend
33codegen/openapi-generator-cli generate -i openapi.yaml -g python-flask -t codegen/templates/ -o src-gen
34# client
35#codegen/openapi-generator-cli generate -i openapi.yaml -g javascript -o src-gen/openapi_server/static/
36#rm -R src-gen/openapi_server/static/.openapi*
37
38
39cd src-gen/
40tox > /tmp/openapi_tox.log
41python3 -m openapi_server
Note: See TracBrowser for help on using the repository browser.