Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fda-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
FAIR Data Austria DB Repository
fda-docs
Commits
dffd3fa3
Verified
Commit
dffd3fa3
authored
1 year ago
by
Martin Weise
Browse files
Options
Downloads
Patches
Plain Diff
Updated order
parent
150575df
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+3
-3
3 additions, 3 deletions
Makefile
swagger/generate.sh
+11
-11
11 additions, 11 deletions
swagger/generate.sh
with
14 additions
and
14 deletions
Makefile
+
3
−
3
View file @
dffd3fa3
...
...
@@ -2,7 +2,7 @@
TAG
?=
latest
all
:
build
-docs
all
:
build
clean
:
rm
-rf
./site
...
...
@@ -16,10 +16,10 @@ verify:
build
:
mkdocs build
cd
./swagger
&&
bash .
/generate.sh
bash
./swagger/generate.sh
build-swagger
:
cd
./swagger
&&
UPDATE
=
1 .
/generate.sh
bash
./swagger/generate.sh
deploy-docs
:
tar
czfv ./final.tar.gz ./final
...
...
This diff is collapsed.
Click to expand it.
swagger/generate.sh
+
11
−
11
View file @
dffd3fa3
...
...
@@ -14,40 +14,40 @@ services[9099]=metadata
function
retrieve
()
{
if
[[
"
$2
"
==
analyse
]]
;
then
echo
"... retrieve json api from localhost:
$1
"
wget
"http://localhost:
$1
/api-
$2
.json"
-O
"./api-
$2
.yaml"
-q
wget
"http://localhost:
$1
/api-
$2
.json"
-O
"./
swagger/
api-
$2
.yaml"
-q
else
echo
"... retrieve yaml api from localhost:
$1
"
wget
"http://localhost:
$1
/v3/api-docs.yaml"
-O
"./api-
$2
.yaml"
-q
wget
"http://localhost:
$1
/v3/api-docs.yaml"
-O
"./
swagger/
api-
$2
.yaml"
-q
fi
}
function
generate
()
{
echo
"... generate python api"
java
-jar
swagger-codegen-cli.jar generate
-i
"./api-
$1
.yaml"
-l
python
-o
"./api-
$1
"
>
/dev/null
java
-jar
swagger-codegen-cli.jar generate
-i
"./
swagger/
api-
$1
.yaml"
-l
python
-o
"./
swagger/
api-
$1
"
>
/dev/null
}
function
remove
()
{
echo
"... removing old python api"
rm
-rf
"./api/api_
$1
"
rm
-rf
"./
swagger/
api/api_
$1
"
}
function
copy
()
{
echo
"... copying python api"
cp
-r
"./api-
$1
/swagger_client"
"./api/api_
$1
"
cp
"./api-
$1
.yaml"
"./
$1
/api.yaml"
cp
-r
.
./dist/
*
"./
$1
"
cp
-r
"./
swagger/
api-
$1
/swagger_client"
"./
swagger/
api/api_
$1
"
cp
"./
swagger/
api-
$1
.yaml"
"./
swagger/
$1
/api.yaml"
cp
-r
./dist/
*
"./
swagger/
$1
"
}
function
replace
()
{
echo
"... replacing swagger client package name and gateway"
find
"./api/api_
$2
"
-type
f
-exec
sed
-i
-e
"s/swagger_client/api_
$2
/g"
{}
\;
find
"./api/api_
$2
"
-type
f
-exec
sed
-i
-e
"s/self.host = .*/self.host =
\"
http:
\/\/
localhost:9095
\"
/g"
{}
\;
find
"./
swagger/
api/api_
$2
"
-type
f
-exec
sed
-i
-e
"s/swagger_client/api_
$2
/g"
{}
\;
find
"./
swagger/
api/api_
$2
"
-type
f
-exec
sed
-i
-e
"s/self.host = .*/self.host =
\"
http:
\/\/
localhost:9095
\"
/g"
{}
\;
}
function
move
()
{
echo
"... moving swagger static files"
mkdir
-p
.
./site/swagger
cp
-r
"./
$1
"
.
./site/swagger
mkdir
-p
./site/swagger
cp
-r
"./
swagger/
$1
"
./site/swagger
}
for
key
in
"
${
!services[@]
}
"
;
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment