-
Notifications
You must be signed in to change notification settings - Fork 2
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
Chore/oas export #423
Open
lutangar
wants to merge
17
commits into
master
Choose a base branch
from
chore/oas-export
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Chore/oas export #423
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5d34f8b
fix(oas): remove invalid ref property
lutangar 9f1b9b7
fix(oas): update api platform core
lutangar 79e7206
wip: test
lutangar 56cd67b
chore: composer v2
lutangar d94b135
chore: symfony cli
lutangar 9a0bbae
chore: add moar caches
lutangar 008f407
chore: update stan command
lutangar 95d222f
chore: add phpunit install step
lutangar 9f1471f
chore: add update oas in generator repo
lutangar 0b3a8dc
add path
lutangar bfe60d6
test
lutangar 8b83f16
test
lutangar 10ac4f8
fix file name
lutangar d31c911
chore(api): don't allow stats count edition from the API
lutangar 5e084bc
chore(api): don't allow stats count edition from the API
lutangar 242232d
fix(api-v4): fix various authentication config bugs
lutangar 9351c57
fix(api-v4): fix authentication test
lutangar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Export Open API Specification file | ||
on: | ||
# Trigger the workflow on pull requests targeting the master branch | ||
pull_request: | ||
types: [assigned, unassigned, opened, reopened, synchronize, edited, labeled, unlabeled, edited, closed] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
symfony: | ||
runs-on: ${{ matrix.operating-system }} | ||
name: Symfony 4.4, PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} | ||
env: | ||
EXTENSIONS: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, filter, gd, iconv, json, mbstring, pdo | ||
CACHE_KEY: cache-v2 # can be any string, change to clear the extension cache. | ||
GENERATOR_PATH: api-client-generator | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['7.3'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup cache environment | ||
id: extcache | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
EXTENSIONS: ${{ env.EXTENSIONS }} | ||
key: ${{ env.CACHE_KEY }} | ||
|
||
- name: Cache extensions | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.extcache.outputs.dir }} | ||
key: ${{ steps.extcache.outputs.key }} | ||
restore-keys: ${{ steps.extcache.outputs.key }} | ||
|
||
- name: Setup PHP, extension and tools | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.EXTENSIONS }} | ||
tools: phpunit, composer:v2, symfony-cli | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Check Symfony requirements | ||
run: symfony check:requirements | ||
|
||
- name: Check the Symfony console | ||
run: | | ||
bin/console about | ||
|
||
- name: Run PHPUnit install to generate autoload file required by PHPStan | ||
run: | | ||
bin/phpunit install | ||
|
||
- name: Run PHPStan | ||
run: composer stan | ||
|
||
- name: Checkout generator repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository_owner }}/api-client-generator | ||
token: ${{ secrets.PAT }} | ||
path: ${{ env.GENERATOR_PATH }} | ||
|
||
- name: Export Open API Specification file | ||
run: | | ||
php bin/console api:openapi:export --yaml --output=${{ env.GENERATOR_PATH }}/oas.yaml | ||
|
||
- uses: peter-evans/create-pull-request@v3 | ||
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. Can you explain why we create a PR here ? |
||
with: | ||
token: ${{ secrets.PAT }} | ||
path: ${{ env.GENERATOR_PATH }} | ||
commit-message: ${{ github.event.pull_request.title }}-removeme | ||
committer: GitHub <[email protected]> | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
branch: ${{ github.event.pull_request.head.ref }} | ||
title: ${{ github.event.pull_request.title }} | ||
body: | | ||
> ${{ github.event.pull_request.body }} | ||
> Created by @${{ github.actor }} via ${{ github.event.pull_request.html_url }} | ||
delete-branch: true | ||
labels: ${{ join(github.event.pull_request.labels.*.name) }} | ||
assignees: ${{ join(github.event.pull_request.assignees.*.login) }} | ||
reviewers: ${{ join(github.event.pull_request.requested_reviewers.*.login) }} | ||
# draft: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
api_platform: | ||
resource: . | ||
type: api_platform | ||
prefix: /api/v4 | ||
|
||
api_v4: | ||
resource: . | ||
type: api_platform | ||
prefix: /v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate
edited