@team-supercharge/oasg 14.1.0-feature-python-fastapi-6dc5992a.0 → 14.1.0-feature-python-fastapi-e25c0a08.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 +20 -0
- package/bin/oasg +18 -17
- package/config.schema.yml +15 -0
- package/package.json +1 -1
- package/targets/android/templates/build.gradle.mustache +1 -1
- package/targets/python-fastapi-raw-request/generate.sh +32 -0
- package/targets/python-fastapi-raw-request/generator-config.json +7 -0
- package/targets/python-fastapi-raw-request/publish.sh +9 -0
- /package/targets/{python-fastapi → python-fastapi-raw-request}/templates/README.mustache +0 -0
- /package/targets/{python-fastapi → python-fastapi-raw-request}/templates/api.mustache +0 -0
- /package/targets/{python-fastapi → python-fastapi-raw-request}/templates/base_api.mustache +0 -0
- /package/targets/{python-fastapi → python-fastapi-raw-request}/templates/endpoint_argument_definition.mustache +0 -0
- /package/targets/{python-fastapi → python-fastapi-raw-request}/templates/pyproject_toml.mustache +0 -0
- /package/targets/{python-fastapi → python-fastapi-raw-request}/templates/requirements.mustache +0 -0
package/README.md
CHANGED
|
@@ -704,6 +704,26 @@ Publishing the PyPI packages is done with Twine. For authentication againts the
|
|
|
704
704
|
Building the distribution package requires Flit.
|
|
705
705
|
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.
|
|
706
706
|
|
|
707
|
+
#### `python-fastapi-raw-request`
|
|
708
|
+
|
|
709
|
+
```json
|
|
710
|
+
{
|
|
711
|
+
"id": "server-python",
|
|
712
|
+
"type": "python-fastapi-raw-request",
|
|
713
|
+
"source": "source-merged",
|
|
714
|
+
"packageName": "oasg_example",
|
|
715
|
+
"repositoryUrl": "https://gitlab.supercharge.io/api/v4/projects/1226/packages/pypi"
|
|
716
|
+
}
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
|Parameter| Description| Required | Default |
|
|
720
|
+
|-|-|-|-|
|
|
721
|
+
| packageName | Package nem for the project (convention: snake_case) | Y | - |
|
|
722
|
+
| repositoryUrl | URL of the PyPI repository | Y | - |
|
|
723
|
+
|
|
724
|
+
Building the distribution package requires Flit.
|
|
725
|
+
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.
|
|
726
|
+
|
|
707
727
|
#### `contract-testing`
|
|
708
728
|
|
|
709
729
|
```json
|
package/bin/oasg
CHANGED
|
@@ -34,25 +34,26 @@ const PROXY_PORT = '9999';
|
|
|
34
34
|
|
|
35
35
|
const DEFAULT_GENERATOR_MAPPING = {
|
|
36
36
|
// client targets
|
|
37
|
-
"android":
|
|
38
|
-
"angular":
|
|
39
|
-
"feign":
|
|
40
|
-
"feign-kotlin":
|
|
41
|
-
"flutter":
|
|
42
|
-
"ios":
|
|
43
|
-
"kmp":
|
|
44
|
-
"python":
|
|
45
|
-
"react":
|
|
37
|
+
"android": { version: '7.0.1', generator: 'kotlin' },
|
|
38
|
+
"angular": { version: '7.0.1', generator: 'typescript-angular' },
|
|
39
|
+
"feign": { version: '7.0.1', generator: 'spring' },
|
|
40
|
+
"feign-kotlin": { version: '7.0.1', generator: 'kotlin-spring' },
|
|
41
|
+
"flutter": { version: '7.0.1', generator: 'dart-dio' },
|
|
42
|
+
"ios": { version: '7.0.1', generator: 'swift5' },
|
|
43
|
+
"kmp": { version: '7.8.0', generator: 'kotlin' },
|
|
44
|
+
"python": { version: '7.0.1', generator: 'python' },
|
|
45
|
+
"react": { version: '7.0.1', generator: 'typescript-fetch' },
|
|
46
46
|
// server targets
|
|
47
|
-
"nestjs":
|
|
48
|
-
"spring":
|
|
49
|
-
"spring-kotlin":
|
|
50
|
-
"python-fastapi":
|
|
51
|
-
"
|
|
47
|
+
"nestjs": { version: '7.0.1', generator: 'typescript-angular' },
|
|
48
|
+
"spring": { version: '7.0.1', generator: 'spring' },
|
|
49
|
+
"spring-kotlin": { version: '7.0.1', generator: 'kotlin-spring' },
|
|
50
|
+
"python-fastapi": { version: '7.8.0', generator: 'python-fastapi' },
|
|
51
|
+
"python-fastapi-raw-request": { version: '7.0.1', generator: 'python-fastapi' },
|
|
52
|
+
"dotnet": { version: '7.8.0', generator: 'csharp-functions' },
|
|
52
53
|
// misc targets
|
|
53
|
-
"contract-testing":
|
|
54
|
-
"openapi":
|
|
55
|
-
"stubby":
|
|
54
|
+
"contract-testing": { version: '4.3.1', generator: 'typescript-node' },
|
|
55
|
+
"openapi": { version: undefined, generator: undefined },
|
|
56
|
+
"stubby": { version: '4.3.1', generator: 'stubby' },
|
|
56
57
|
};
|
|
57
58
|
const DEFAULT_KTLINT_VERSION = '1.0.0';
|
|
58
59
|
const BIN_FOLDER = 'out/.bin';
|
package/config.schema.yml
CHANGED
|
@@ -21,6 +21,7 @@ properties:
|
|
|
21
21
|
- $ref: '#/targets/ios'
|
|
22
22
|
- $ref: '#/targets/Python'
|
|
23
23
|
- $ref: '#/targets/PythonFastApi'
|
|
24
|
+
- $ref: '#/targets/PythonFastApiRawRequest'
|
|
24
25
|
- $ref: '#/targets/ContractTesting'
|
|
25
26
|
- $ref: '#/targets/NestJS'
|
|
26
27
|
- $ref: '#/targets/OpenAPI'
|
|
@@ -312,6 +313,20 @@ targets:
|
|
|
312
313
|
- packageName
|
|
313
314
|
- repositoryUrl
|
|
314
315
|
|
|
316
|
+
PythonFastApiRawRequest:
|
|
317
|
+
allOf:
|
|
318
|
+
- $ref: '#/targets/Base'
|
|
319
|
+
- properties:
|
|
320
|
+
type:
|
|
321
|
+
pattern: "^python-fastapi-raw-request$"
|
|
322
|
+
packageName:
|
|
323
|
+
type: string
|
|
324
|
+
repositoryUrl:
|
|
325
|
+
type: string
|
|
326
|
+
required:
|
|
327
|
+
- packageName
|
|
328
|
+
- repositoryUrl
|
|
329
|
+
|
|
315
330
|
ContractTesting:
|
|
316
331
|
allOf:
|
|
317
332
|
- $ref: '#/targets/Base'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-supercharge/oasg",
|
|
3
|
-
"version": "14.1.0-feature-python-fastapi-
|
|
3
|
+
"version": "14.1.0-feature-python-fastapi-e25c0a08.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",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#/bin/bash
|
|
2
|
+
|
|
3
|
+
source $(dirname "$0")/../common.sh
|
|
4
|
+
|
|
5
|
+
# if the version contains a `-` character, then use PEP 440 beta version syntax
|
|
6
|
+
# example: 1.0.0-beta.1 -> 1.0.0b0+beta.1
|
|
7
|
+
if [[ $version == *"-"* ]]; then
|
|
8
|
+
version=$(echo $version | sed 's/-/b0+/')
|
|
9
|
+
echo "[NOTE] version updated to: ${version}"
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
rm -rf out/$targetId
|
|
13
|
+
mkdir -p out/$targetId
|
|
14
|
+
|
|
15
|
+
java -jar $binary generate \
|
|
16
|
+
-g $generatorId \
|
|
17
|
+
-i $openApiFile \
|
|
18
|
+
-t $templateDir \
|
|
19
|
+
-o out/$targetId \
|
|
20
|
+
-c $(dirname "$0")/generator-config.json \
|
|
21
|
+
-p "packageVersion=$version,packageName=$packageName" $generatorCustomArgs
|
|
22
|
+
|
|
23
|
+
cd out/$targetId
|
|
24
|
+
|
|
25
|
+
touch "src/$packageName/__init__.py"
|
|
26
|
+
python3 -m venv venv
|
|
27
|
+
source venv/bin/activate
|
|
28
|
+
pip install --upgrade pip
|
|
29
|
+
pip install flit==3.9.0
|
|
30
|
+
flit build --no-use-vcs
|
|
31
|
+
|
|
32
|
+
cd ../../
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/targets/{python-fastapi → python-fastapi-raw-request}/templates/pyproject_toml.mustache
RENAMED
|
File without changes
|
/package/targets/{python-fastapi → python-fastapi-raw-request}/templates/requirements.mustache
RENAMED
|
File without changes
|