Skip to content

Conversation

@paulRbr
Copy link
Member

@paulRbr paulRbr commented Oct 16, 2023

Add an additional step to automatically generate to API contract in the CI step.

@paulRbr paulRbr force-pushed the generate-openapi-diff branch 9 times, most recently from 552efab to 07007b5 Compare October 16, 2023 12:58
@paulRbr paulRbr force-pushed the generate-openapi-diff branch from 07007b5 to 0902340 Compare October 16, 2023 14:52
With this commit:

Review can be deleted (operation added)
Boon can not be deleted (operation removed, this is a breaking change)
@github-actions
Copy link

🚨 Breaking API change detected:

Added (1)

  • DELETE /reviews/{id}

Removed (1)

  • [Breaking] DELETE /books/{id}

Powered by Bump.sh

@paulRbr
Copy link
Member Author

paulRbr commented Oct 16, 2023

ping @Polo2 Here's my suggestion to automatically generate the API contract as part of the CI process. I'll remove the commit changing the API (be4a835) if you're ok to merge this

Copy link
Member

@Polo2 Polo2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for this suggestion @paulRbr.

Could we discuss sync about the strategy here, and the new process allowed by this cutom GitHub action?

doc: apiplatform-test-demo
token: ${{secrets.BUMP_TOKEN}}
file: docs/openapi.json
file: api/openapi.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to keep contract on same file docs/openapi.json ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or does it mean openapi contract is not persisted anymore (there is no file api/openapi.json with second commit)

options: -v ${{github.workspace}}/api:/srv/app -v /srv/app/vendor
run: |
composer require symfony/runtime
php bin/console api:openapi:export > openapi.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to keep contract on same file docs/openapi.json ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants