Skip to content

Commit 95fd1d2

Browse files
committed
Problem: openapi-generator prepends / to paths
Solution: use sed to remove '/' from generated code closes: #4691 https://pulp.plan.io/issues/4691
1 parent b76b2b0 commit 95fd1d2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

generate.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ then
1313
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \
1414
-i /local/api.json \
1515
-g python \
16+
--library asyncio \
1617
-o /local/$1-client \
1718
-DpackageName=pulpcore.client.$1 \
1819
-DprojectName=$1-client \
19-
-DpackageVersion=${VERSION}
20+
-DpackageVersion=${VERSION} \
2021
--skip-validate-spec
2122
cp python/__init__.py $1-client/pulpcore/
2223
cp python/__init__.py $1-client/pulpcore/client
24+
find $1-client/ -type f | xargs sed -i 's/\/{/{/g'
25+
2326
fi
2427
if [ $2 = 'ruby' ]
2528
then
@@ -30,7 +33,9 @@ then
3033
-o /local/$1-client \
3134
-DgemName=$1_client \
3235
-DgemLicense="GPLv2" \
33-
-DgemVersion=${VERSION}
36+
-DgemVersion=${VERSION} \
37+
--skip-validate-spec
38+
find $1-client/ -type f | xargs sed -i 's/\/{/{/g'
3439
fi
3540

3641
rm api.json

0 commit comments

Comments
 (0)