-
Notifications
You must be signed in to change notification settings - Fork 145
Add Paths and Parameters to OpenAPI spec generation #1319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b9c4b43
60d7a6c
1341ad9
5d93e3f
8385f1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: Generate OpenAPI Specification | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| paths: | ||
| - 'config/api.yml' | ||
| - 'lib/manageiq/api/open_api/**' | ||
| - 'app/controllers/api/**' | ||
| schedule: | ||
| - cron: 0 0 * * 0 | ||
| workflow_dispatch: | ||
| concurrency: | ||
| group: "${{ github.workflow }}-${{ github.ref }}" | ||
| cancel-in-progress: true | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| openapi-generate: | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| postgres: | ||
| image: manageiq/postgresql:13 | ||
| env: | ||
| POSTGRESQL_USER: root | ||
| POSTGRESQL_PASSWORD: smartvm | ||
| POSTGRESQL_DATABASE: vmdb_test | ||
| options: "--health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5" | ||
| ports: | ||
| - 5432:5432 | ||
| env: | ||
| PGHOST: localhost | ||
| PGPASSWORD: smartvm | ||
| RAILS_ENV: test | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| - name: Set up system | ||
| run: bin/before_install | ||
| - name: Set up Ruby | ||
|
agrare marked this conversation as resolved.
|
||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.3' | ||
| bundler-cache: true | ||
| timeout-minutes: 30 | ||
| - name: Prepare tests | ||
| run: bin/setup | ||
| - name: Generate OpenAPI specification | ||
| run: bundle exec rake manageiq:api:openapi_generate | ||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reminder to self that I need to associate this token with this repo after merge.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Second reminder, I also need to fork this repo on the bot account. |
||
| commit-message: "Update OpenAPI specification" | ||
| title: "Update OpenAPI specification" | ||
| body: | | ||
| ## OpenAPI Specification Update | ||
|
|
||
| This PR updates the OpenAPI specification (`config/openapi.json`) based on the current API configuration. | ||
|
|
||
| ### Changes | ||
| - Regenerated OpenAPI spec from `config/api.yml` | ||
| - Updated schemas, paths, and operations | ||
|
|
||
| ### Generated by | ||
| - Workflow: `${{ github.workflow }}` | ||
| - Run: `${{ github.run_number }}` | ||
| - Triggered by: `${{ github.workflow_ref }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}` | ||
|
|
||
| ### Review Checklist | ||
| - [ ] Verify new/modified endpoints are documented correctly | ||
| - [ ] Check parameter definitions are accurate | ||
| - [ ] Ensure response schemas match actual API responses | ||
| - [ ] Validate security schemes are properly defined | ||
|
|
||
| --- | ||
| *This PR was automatically generated by GitHub Actions* | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part is kind of cool - wondering if we should add that to the other ones, perhaps along with a reference back to the action that generated it. Maybe the "generated by" here can be the link. |
||
| branch: openapi_generate | ||
| delete-branch: true | ||
| push-to-fork: miq-bot/manageiq-api | ||
| labels: | | ||
| enhancement | ||
| add-paths: | | ||
| config/openapi.json | ||
Uh oh!
There was an error while loading. Please reload this page.