Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: oapi-codegen/oapi-codegen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: oapi-codegen/oapi-codegen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release/v2.7.x
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 14 files changed
  • 2 contributors

Commits on Jun 5, 2026

  1. Improve string escaping and add tests (#2396)

    Tighten how server URL values are emitted in the server-urls template so
    that spec-supplied text is always serialized into a proper Go context:
    
    - Route server descriptions and URLs through stripNewLines when they are
      written into generated // comments, so a multi-line value stays on the
      comment line instead of spilling into following lines.
    - Emit server URL and variable-default values via toGoString (now backed
      by strconv.Quote) instead of hand-wrapping them in quotes, so quotes,
      backslashes, and newlines are escaped correctly.
    - Harden StringToGoString to use strconv.Quote; the previous version only
      escaped double quotes and mishandled backslashes. This also tidies up
      the content-type literals that already used it.
    - Extend stripNewLines to drop carriage returns as well as newlines.
    
    Add regression tests covering the server-urls rendering and the
    StringToGoString escaping, and confirm `make generate` produces no
    changes to committed output.
    
    Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
    mromaszewicz and claude committed Jun 5, 2026
    Configuration menu
    Copy the full SHA
    19c6282 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2026

  1. Make sure to escape user strings (#2433) (#2434)

    Spec-derived paths and string enum values were interpolated into generated
    Go source without escaping, so a value containing a quote could produce
    malformed output. Route paths in the server registration templates and
    string enum constants are now emitted through strconv.Quote (the existing
    toGoString helper) so they are always valid, properly-escaped Go string
    literals. Generated output is unchanged for normal specs.
    
    Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
    mromaszewicz and claude authored Jul 6, 2026
    Configuration menu
    Copy the full SHA
    3c4a475 View commit details
    Browse the repository at this point in the history
Loading