Skip to content

Codegen hygiene: regeneration is not formatted, a Task checksum is tracked, docs name two spec sources #39

In review

Description

@DzmitryHumianiuk

task generate-openapi-client cannot be used for a clean regeneration PR today. Four small problems, all contributor-only (no effect on users of the CLI or the library):

  1. The generated code is not formatted. generate-openapi-client (Taskfile.yml:80-97) generates, copies compat.go and swaps the result into pkg/openapi. The committed pkg/openapi is gofmt-clean (gofmt -l pkg/openapi prints nothing), so the author has to remember to run task fmt afterwards; otherwise the PR shows formatting-only changes. openapi: decode ErrorRS.errorCode as an integer #33 reports 372 changed files after a plain generation and 0 after go fmt ./pkg/openapi/; that count was not reproduced here (no Docker), but pkg/openapi has 374 .go files.
  2. .task/checksum/preprocess-schema is tracked although .gitignore:42 ignores .task/. It was added in 247d914 (a CI commit) and is the only tracked-but-ignored file. preprocess:schema rewrites it whenever the spec or the jq filter changes.
  3. Two documents name two spec sources. Taskfile.yml:16 says https://beta.epmrpp.reportportal.io/api/api-docs, AGENTS.md:92 says https://demo.reportportal.io/api/v1/api-docs. The second URL answers 401 without credentials.
  4. Generator scaffolding is tracked in pkg/openapi: .travis.yml, git_push.sh, README.md (682 links to docs/*.md files that are not generated, and the import path github.com/reportportal/gorp/v5/pkg/openapi in the wrong case).

Expected: one command regenerates pkg/openapi in its committed form, and the docs name one spec source.


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions