Skip to content

refactor(docs): update doc generation#2626

Merged
jirevwe merged 9 commits intomainfrom
raymond/fix/update-doc-generation
Apr 21, 2026
Merged

refactor(docs): update doc generation#2626
jirevwe merged 9 commits intomainfrom
raymond/fix/update-doc-generation

Conversation

@jirevwe
Copy link
Copy Markdown
Collaborator

@jirevwe jirevwe commented Apr 17, 2026

Summary

  • Replace all dashboard.getconvoy.io URLs across docs with region-specific {region}.getconvoy.cloud domains (US and EU)
  • Update openapi.yml with the latest auto-generated OpenAPI 3.0 spec from the convoy repo, including dual-server entries for US and EU regions
  • Add 6 new API reference pages for endpoints that were missing from the docs: activate endpoint, test OAuth2 connection, import event types, refresh portal link token, validate source function, and test a
    filter
  • Update docs.json navigation to include the new API reference pages

Related

Comment thread docs/fix_openapi_spec.sh Outdated
Comment thread docs/docs.go
Comment thread .githooks/pre-commit
swag fmt -d ./api
go run v3gen/main.go
bash docs/fix_openapi_spec.sh
api-spec-converter --from=swagger_2 --to=openapi_3 -s yaml ./docs/swagger.yaml > ./docs/v3/openapi3.yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This hook now requires jq, yq, and api-spec-converter. Please add command -v checks with install hints so failures are clear for non-mise setups.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We should not require anyone to install these on their machines imo. That's why the dependency manager exists. These tools will never run in CI or in prod, it will always run locally.

Comment thread .mise-tasks/gen/docs.sh
bash docs/fix_openapi_spec.sh

#generate v3 specs
api-spec-converter --from=swagger_2 --to=openapi_3 -s yaml ./docs/swagger.yaml > ./docs/v3/openapi3.yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Please add a small required-tools preflight (jq, yq, api-spec-converter) so it fails fast with a clear message.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same thing here. Forcing people to install a tool they'll only use to generate docs and making sure everyone is on the same version is a problem we struggled with for a long time and it makes no sense to keep supporting it

Comment thread docs/annotate_dtos/main.go Outdated
@jirevwe jirevwe self-assigned this Apr 17, 2026
Comment thread .githooks/pre-commit
exit 0
else
# check required tools
for tool in swag jq yq api-spec-converter openapi; do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Partially fixed. Tool checks were added, but openapi is now required in preflight and still not pinned in mise.toml. Please add it so mise install matches the hook requirements.

Comment thread .mise-tasks/gen/docs.sh
set -e

# preflight: check required tools
for tool in swag jq yq api-spec-converter openapi; do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Partially fixed. Preflight is in place, but it now checks openapi and mise.toml still does not include it.

Comment thread docs/annotate_dtos/main.go Outdated
dryRun := len(os.Args) > 1 && os.Args[1] == "--dry-run"

dtoDir := "./api/models"
if len(os.Args) > 2 {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still open. Custom directory parsing still uses os.Args[2], so go run docs/annotate_dtos/main.go ./api/models does not work.

Copy link
Copy Markdown
Collaborator Author

@jirevwe jirevwe Apr 17, 2026

Choose a reason for hiding this comment

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

It will never be used like that. We generate docs for the whole project, not per folder.

@mekilis
Copy link
Copy Markdown
Collaborator

mekilis commented Apr 17, 2026

Also rebase from main. Thanks

@jirevwe jirevwe merged commit 99f5228 into main Apr 21, 2026
15 checks passed
@jirevwe jirevwe deleted the raymond/fix/update-doc-generation branch April 21, 2026 06:28
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.

2 participants