chore: Allow configuring alias for path parameters when names do not match properties in req/resp bodies #57
Workflow file for this run
This file contains hidden or 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
name: 'Generate Resource' | |
# Set of validations run on each pull request and merged commits to master. | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- tools/codegen/** | |
- internal/service/*api/** | |
pull_request: | |
paths: | |
- tools/codegen/** | |
- internal/service/*api/** | |
workflow_dispatch: | |
jobs: | |
generate-resource-check: | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b | |
with: | |
go-version-file: 'go.mod' | |
- run: make enable-autogen generate-resources # enable-autogen registers autogenerated resources ensuring docs are also generated | |
- name: Find mutations | |
id: self_mutation | |
run: |- | |
git add . | |
git diff --staged --patch --exit-code > resource.repo.patch || echo "self_mutation_happened=true" >> "${GITHUB_OUTPUT}" | |
- name: Fail build on mutation | |
if: steps.self_mutation.outputs.self_mutation_happened | |
run: |- | |
echo "::error::Files were changed during build (see build log). If this was triggered from a fork, you will need to update your branch." | |
cat resource.repo.patch | |
exit 1 |