diff --git a/.github/workflows/oasdiff.yml b/.github/workflows/oasdiff.yml deleted file mode 100644 index ed97d9f..0000000 --- a/.github/workflows/oasdiff.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: oasdiff - -on: - pull_request: - -permissions: - pull-requests: write - -jobs: - oasdiff: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - run: git fetch --depth=1 origin ${{ github.base_ref }} - - - uses: oasdiff/oasdiff-action/pr-comment@v0.0.31 - with: - base: 'origin/${{ github.base_ref }}:simple.yaml' - revision: 'HEAD:simple.yaml' - oasdiff-token: ${{ secrets.OASDIFF_TOKEN }} diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 2e5b105..0f397e6 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -1,23 +1,20 @@ -name: oasdiff PR comment +name: API Breaking Change Check on: pull_request: - -permissions: - contents: read - pull-requests: write - statuses: write + paths: + - 'simple.yaml' jobs: - pr-comment: + breaking-changes: runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + + - run: git fetch --depth=1 origin ${{ github.base_ref }} - - name: Post oasdiff PR comment - uses: oasdiff/oasdiff-action/pr-comment@v0.0.34 - with: - base: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.base_ref }}/simple.yaml - revision: simple.yaml - oasdiff-token: 0634345d-02fb-43df-b56a-68fc22253621 + - uses: oasdiff/oasdiff-action/breaking@main + with: + base: 'origin/${{ github.base_ref }}:simple.yaml' + revision: 'HEAD:simple.yaml' + fail-on: ERR diff --git a/simple.yaml b/simple.yaml index b635d93..9c993b7 100644 --- a/simple.yaml +++ b/simple.yaml @@ -9,9 +9,12 @@ components: groupId: in: query name: groupId - required: false + required: true schema: - type: string + type: object + properties: + id: + type: number schemas: GroupView: type: object @@ -23,16 +26,35 @@ components: type: string format: date-time readOnly: true - pattern: "^[a-z]+$" + pattern: "^[A-Z]+$" id: type: string readOnly: true name: type: string + email: + type: string required: - name + - email1 paths: /api/v1.0/groups: + get: + tags: + - Group + operationId: getGroups + parameters: + - $ref: '#/components/parameters/groupId' + responses: + "200": + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupView' + description: SUCCESS + summary: Get Projects post: tags: - Group