Skip to content

Commit

Permalink
OpenAPI breaking changes CI tests (#6612)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan-Rosenberg authored Sep 27, 2023
1 parent b2a4e50 commit ed8ace8
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 5 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/openapi-breaking-changes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: lakeFS OpenAPI Compatibility Tests

on:
pull_request:
paths:
- "api/**"
push:
branches:
- master
workflow_dispatch: {}

jobs:
swagger-backward-compatibility:
name: Swagger compatibility tests
runs-on: ubuntu-20.04
steps:
- name: Check-out revised code
uses: actions/checkout@v4
with:
path: 'changed'
sparse-checkout: |
api/swagger.yml
api/authorization.yml
sparse-checkout-cone-mode: false
- name: Check-out base code
uses: actions/checkout@v4
with:
ref: 'master'
path: 'base'
sparse-checkout: |
api/swagger.yml
api/authorization.yml
sparse-checkout-cone-mode: false
- name: Check lakeFS swagger YAML
id: test_swagger_breaking_changes
uses: oasdiff/oasdiff-action/breaking@main
with:
base: base/api/swagger.yml
revision: changed/api/swagger.yml
fail-on-diff: true
- name: Check authorization YAML
id: test_authorization_breaking_changes
uses: oasdiff/oasdiff-action/breaking@main
with:
base: base/api/authorization.yml
revision: changed/api/authorization.yml
fail-on-diff: true
10 changes: 5 additions & 5 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorNoACL"

Unauthorized:
description: Unauthorized
content:
Expand Down Expand Up @@ -1244,7 +1244,7 @@ components:
example: s3://my-bucket/production/collections/
destination:
type: string
description: Destination for the imported objects on the branch
description: Destination for the imported objects on the branch
example: collections/

ImportCreation:
Expand Down Expand Up @@ -1317,14 +1317,14 @@ components:
required:
- update_time
- completed

ImportCreationResponse:
type: object
properties:
id:
description: The id of the import process
type: string
required:
required:
- id

MetaRangeCreation:
Expand Down Expand Up @@ -4074,7 +4074,7 @@ paths:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"

post:
tags:
- retention
Expand Down

0 comments on commit ed8ace8

Please sign in to comment.