diff --git a/jans-cli/setup.py b/jans-cli/setup.py index f769117490c..ce163b0c6f0 100644 --- a/jans-cli/setup.py +++ b/jans-cli/setup.py @@ -8,6 +8,23 @@ import re from setuptools import setup from setuptools import find_packages +from setuptools.command.install import install +from urllib.request import urlretrieve + +class PostInstallCommand(install): + """Post-installation for installation mode.""" + def run(self): + install.run(self) + + urlretrieve( + 'https://raw.githubusercontent.com/JanssenProject/jans/main/jans-config-api/docs/jans-config-api-swagger.yaml', + os.path.join(self.install_lib, 'cli/jca.yaml') + ) + + urlretrieve( + 'https://raw.githubusercontent.com/JanssenProject/jans/main/jans-scim/server/src/main/resources/jans-scim-openapi.yaml', + os.path.join(self.install_lib, 'cli/scim.yaml') + ) def find_version(*file_paths): @@ -61,4 +78,7 @@ def find_version(*file_paths): "scim-cli=cli.config_cli:main", ], }, + cmdclass={ + 'install': PostInstallCommand, + }, )