ci: use manually compiled version of openapi-generator-cli for now due to #1

This commit is contained in:
Foorack
2021-10-28 21:10:16 +02:00
parent 94002a20ea
commit 4811cf2aa3
7 changed files with 1873 additions and 6 deletions

View File

@ -21,10 +21,15 @@ jobs:
key: ${{ runner.os }}-node-v16-${{ hashFiles('**/generate.sh') }} key: ${{ runner.os }}-node-v16-${{ hashFiles('**/generate.sh') }}
restore-keys: | restore-keys: |
${{ runner.os }}-node-v16 ${{ runner.os }}-node-v16
- name: Install OpenAPI Generator CLI # - name: Install OpenAPI Generator CLI
run: npm install @openapitools/openapi-generator-cli # run: npm install @openapitools/openapi-generator-cli
- name: Set OpenAPI Generator version # - name: Set OpenAPI Generator version
run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 5.3.0 # run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 5.3.0
- name: Set up JDK 13
uses: actions/setup-java@v2
with:
java-version: '13'
distribution: 'adopt'
- name: Install Rustup toolchain - name: Install Rustup toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/target/ /target/
**/*.rs.bk **/*.rs.bk
Cargo.lock Cargo.lock
node_modules

View File

@ -22,4 +22,5 @@
# Then explicitly reverse the ignore rule for a single file: # Then explicitly reverse the ignore rule for a single file:
#!docs/README.md #!docs/README.md
README.md README.md
.gitignore

View File

@ -3,7 +3,7 @@
# Generate Client # Generate Client
rm src/apis src/models docs -rf rm src/apis src/models docs -rf
./node_modules/\@openapitools/openapi-generator-cli/main.js generate \ java -jar ./openapi-generator-cli.jar generate \
-g rust \ -g rust \
--additional-properties=packageName=vrchatapi,supportAsync=false \ --additional-properties=packageName=vrchatapi,supportAsync=false \
--git-user-id=vrchatapi \ --git-user-id=vrchatapi \
@ -11,6 +11,7 @@ rm src/apis src/models docs -rf
-o . \ -o . \
-i https://vrchatapi.github.io/specification/openapi.yaml \ -i https://vrchatapi.github.io/specification/openapi.yaml \
--http-user-agent="vrchatapi-rust" --http-user-agent="vrchatapi-rust"
#--global-property debugOperations=true
# Add license and description to Cargo.toml # Add license and description to Cargo.toml
sed -i '/^edition = "2018"/i license = "MIT"' Cargo.toml sed -i '/^edition = "2018"/i license = "MIT"' Cargo.toml

BIN
openapi-generator-cli.jar Normal file

Binary file not shown.

1854
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

5
package.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"@openapitools/openapi-generator-cli": "^2.4.13"
}
}