File tree Expand file tree Collapse file tree 5 files changed +76
-25015
lines changed
Expand file tree Collapse file tree 5 files changed +76
-25015
lines changed Original file line number Diff line number Diff line change 1+ name : Update gem from OpenAPI Spec
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 0 * * 0'
7+
8+ jobs :
9+ openapi-generate :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v5
13+ - name : Set up system
14+ run : sudo apt install -y xq
15+ - name : OpenAPI Generate
16+ run : bin/openapi-generate
17+ - name : Create Pull Request
18+ uses : peter-evans/create-pull-request@v7
19+ with :
20+ add-paths : |
21+ .openapi-generator
22+ docs
23+ lib
24+ README.md
25+ spec
26+ commit-message : Update nutanix_clustermgmt gem
27+ branch : openapi_generate
28+ author : ManageIQ Bot <bot@manageiq.org>
29+ committer : ManageIQ Bot <bot@manageiq.org>
30+ delete-branch : true
31+ labels : enhancement
32+ assignees : agrare
33+ push-to-fork : miq-bot/nutanix_clustermgmt-sdk-ruby
34+ title : Update nutanix_clustermgmt gem
35+ body : Update the nutanix_clustermgmt-sdk-ruby gem from the nutanix_clustermgmt openapi-spec https://developers.nutanix.com/api/v1/namespaces/clustermgmt/versions/v4.0/yaml
36+ token : ${{ secrets.PR_TOKEN }}
Original file line number Diff line number Diff line change 3737
3838# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
3939.rvmrc
40+
41+ openapi-generator-cli- * .jar
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # frozen_string_literal: true
3+
4+ require "bundler/setup"
5+ require "nutanix_clustermgmt"
6+
7+ # You can add fixtures and/or initialization code here to make experimenting
8+ # with your gem easier. You can also use a different console, if you like.
9+
10+ # (If you use this, don't forget to add pry to your Gemfile!)
11+ # require "pry"
12+ # Pry.start
13+
14+ require "irb"
15+ IRB . start ( __FILE__ )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ -z " $OPENAPI_GENERATOR_JAR " ]; then
4+ # Detect the latest version of the openapi-generator-cli package
5+ version=` wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/maven-metadata.xml -O - 2> /dev/null | xq -x " //metadata/versioning/latest" `
6+ OPENAPI_GENERATOR_JAR=openapi-generator-cli-$version .jar
7+
8+ # Download the openapi-generator-cli jar if we don't already have it locally
9+ if [ ! -f " $OPENAPI_GENERATOR_JAR " ]; then
10+ echo " Downloading '$OPENAPI_GENERATOR_JAR '..."
11+ wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$version /$OPENAPI_GENERATOR_JAR
12+ fi
13+ fi
14+
15+ # Clear out any existing files in paths that are autogenerated to prevent deleted files
16+ # from remaining after running the generate
17+ rm -rf ./docs ./lib ./spec
18+
19+ # Generate the gem from the current openapi-spec
20+ input_spec_version=v4.0
21+ input_spec=https://developers.nutanix.com/api/v1/namespaces/clustermgmt/versions/$input_spec_version /yaml
22+
23+ java -jar $OPENAPI_GENERATOR_JAR generate --input-spec $input_spec --skip-validate-spec --generator-name ruby --config .openapi-config.json
You can’t perform that action at this time.
0 commit comments