forked from loafle/openapi-generator-original
[Python] Update python-pydantic-v1 generator to respect the --git-host argument (#19404)
* Update pyproject.mustache
chore(pyproject): replace static `github.com` with variable `{{{gitHost}}}`
* chore: follow contribution guidelines
This commit is contained in:
@@ -18,9 +18,9 @@ Python 3.7+
|
||||
If the python package is hosted on a repository, you can install directly using:
|
||||
|
||||
```sh
|
||||
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
pip install git+https://GIT_HOST/GIT_USER_ID/GIT_REPO_ID.git
|
||||
```
|
||||
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
||||
(you may need to run `pip` with root permission: `sudo pip install git+https://GIT_HOST/GIT_USER_ID/GIT_REPO_ID.git`)
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
|
||||
@@ -9,7 +9,7 @@ release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
git_host="GIT_HOST"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ description = "OpenAPI Petstore"
|
||||
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
|
||||
license = "Apache-2.0"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
repository = "https://GIT_HOST/GIT_USER_ID/GIT_REPO_ID"
|
||||
keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
|
||||
include = ["petstore_api/py.typed"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user