@team-supercharge/oasg 13.2.0-feature-python-fastapi-26619e36.0 → 13.2.0-feature-python-fastapi-455451cf.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -656,6 +656,26 @@ TBD
656
656
 
657
657
  Publishing the PyPI packages is done with Twine. For authentication againts the PiPI repository you need to set the `TWINE_USERNAME` and `TWINE_PASSWORD` environment variables.
658
658
 
659
+
660
+ #### `python-fastapi`
661
+
662
+ ```json
663
+ {
664
+ "id": "server-python",
665
+ "type": "python-fastapi",
666
+ "source": "source-merged",
667
+ "packageName": "oasg_example",
668
+ "repositoryUrl": "https://gitlab.supercharge.io/api/v4/projects/1226/packages/pypi"
669
+ }
670
+ ```
671
+
672
+ |Parameter| Description| Required | Default |
673
+ |-|-|-|-|
674
+ | packageName | Package nem for the project (convention: snake_case) | Y | - |
675
+ | repositoryUrl | URL of the PyPI repository | Y | - |
676
+
677
+ Publishing the PyPI packages is done with Twine. For authentication againts the PiPI repository you need to set the `TWINE_USERNAME` and `TWINE_PASSWORD` environment variables.
678
+
659
679
  #### `contract-testing`
660
680
 
661
681
  ```json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-supercharge/oasg",
3
- "version": "13.2.0-feature-python-fastapi-26619e36.0",
3
+ "version": "13.2.0-feature-python-fastapi-455451cf.0",
4
4
  "description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
5
5
  "author": "Supercharge",
6
6
  "license": "MIT",
@@ -18,5 +18,12 @@ java -jar $binary generate \
18
18
  -p "packageVersion=$version,packageName=$packageName" $generatorCustomArgs
19
19
 
20
20
  cd out/$targetId
21
- python3 setup.py sdist bdist_wheel
21
+
22
+ touch "src/$packageName/__init__.py"
23
+ python3 -m venv venv
24
+ source venv/bin/activate
25
+ pip install --upgrade pip
26
+ pip install flit==3.9.0
27
+ flit build --no-use-vcs
28
+
22
29
  cd ../../
@@ -3,5 +3,7 @@
3
3
  source $(dirname "$0")/../common.sh
4
4
 
5
5
  cd out/$targetId
6
+ source venv/bin/activate
7
+ pip install twine==4.0.2
6
8
  python3 -m twine upload --repository-url $repositoryUrl dist/*
7
9
  cd ../..
@@ -0,0 +1,35 @@
1
+ [project]
2
+ name = "{{packageName}}"
3
+ version = "{{appVersion}}"
4
+ description = "{{appDescription}}"
5
+
6
+ [build-system]
7
+ requires = ["setuptools", "wheel"]
8
+ build-backend = "setuptools.build_meta"
9
+
10
+ [tool.black]
11
+ line-length = 88
12
+ exclude = '''
13
+ (
14
+ /(
15
+ \.eggs # exclude a few common directories in the
16
+ | \.git # root of the project
17
+ | \.hg
18
+ | \.mypy_cache
19
+ | \.tox
20
+ | \.venv
21
+ | _build
22
+ | buck-out
23
+ | build
24
+ | dist
25
+ )/
26
+ )
27
+ '''
28
+
29
+ [tool.isort]
30
+ profile = "black"
31
+ skip = [
32
+ '.eggs', '.git', '.hg', '.mypy_cache', '.nox', '.pants.d', '.tox',
33
+ '.venv', '_build', 'buck-out', 'build', 'dist', 'node_modules', 'venv',
34
+ ]
35
+ skip_gitignore = true