Skip to content

Commit

Permalink
fix(lint): use buf plugins for lint and fixes for AEP compliance.
Browse files Browse the repository at this point in the history
Using buf plugins for linting is a more ergonomic approach, avoiding the 
need to manually clone googleapis.

Fixes to reach AEP compliance: 

- removing apply method as it is not an official AEP at the moment.
  • Loading branch information
toumorokoshi committed Sep 21, 2024
1 parent 1c6d9c0 commit 1147656
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 78 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:

- name: "test: no change to generated files."
run: |
go install github.com/bufbuild/buf/cmd/buf@v1.38.0
go install github.com/bufbuild/buf/cmd/buf@v1.42.0
./scripts/verify-goldens.sh
- name: "test: example server function"
run: |
./scripts/test_http_api.sh
# - name: Run script
# run: |
# ./scripts/run-api-linter.sh
- name: run api-linter
run: |
./scripts/run-api-linter.sh
8 changes: 3 additions & 5 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Generated by buf. DO NOT EDIT.
version: v1
version: v2
deps:
- remote: buf.build
owner: googleapis
repository: googleapis
- name: buf.build/googleapis/googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de
digest: b5:93b70089baa4fc05a92d3e52db91a4b7812db3b57b9664f6cb301733938cb630e377a938e8a56779388171c749c1d42a2e9a6c6230f2ff45f127a8102a6a27d0
6 changes: 4 additions & 2 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
version: v1
version: v2
breaking:
use:
- FILE
lint:
use:
- DEFAULT
- AEP
plugins:
- plugin: buf-plugin-aep
deps:
- buf.build/googleapis/googleapis:28151c0d0a1641bf938a7672c500e01d
2 changes: 1 addition & 1 deletion example/bookstore/v1/bookstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resources:
update: {}
delete: {}
list: {}
apply: {}
apply: {} # do not uncomment until there is an AEP on apply.
# - kind: "Publisher"
# plural: "publishers"
# methods:
Expand Down
116 changes: 75 additions & 41 deletions schema/resourcedefinition.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1147656

Please sign in to comment.