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: go-openapi/strfmt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.26.4
Choose a base ref
...
head repository: go-openapi/strfmt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.27.0
Choose a head ref
  • 11 commits
  • 46 files changed
  • 4 contributors

Commits on Jul 1, 2026

  1. doc: updated contributors file

    Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    bot-go-openapi[bot] authored and github-actions[bot] committed Jul 1, 2026
    Configuration menu
    Copy the full SHA
    ba56127 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2026

  1. build(deps): bump golang.org/x/net

    Bumps the golang-org-dependencies group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net).
    
    
    Updates `golang.org/x/net` from 0.56.0 to 0.57.0
    - [Commits](golang/net@v0.56.0...v0.57.0)
    
    ---
    updated-dependencies:
    - dependency-name: golang.org/x/net
      dependency-version: 0.57.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: golang-org-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and github-actions[bot] committed Jul 10, 2026
    Configuration menu
    Copy the full SHA
    5be05e6 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2026

  1. build(deps): bump the other-dependencies group across 3 directories w…

    …ith 1 update (#277)
    
    Bumps the other-dependencies group with 1 update in the / directory: [go.mongodb.org/mongo-driver/v2](https://github.com/mongodb/mongo-go-driver).
    Bumps the other-dependencies group with 1 update in the /enable/mongodb directory: [go.mongodb.org/mongo-driver/v2](https://github.com/mongodb/mongo-go-driver).
    Bumps the other-dependencies group with 1 update in the /internal/testintegration directory: [go.mongodb.org/mongo-driver/v2](https://github.com/mongodb/mongo-go-driver).
    
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    Updates `go.mongodb.org/mongo-driver/v2` from 2.7.0 to 2.8.0
    - [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
    - [Commits](mongodb/mongo-go-driver@v2.7.0...v2.8.0)
    
    ---
    updated-dependencies:
    - dependency-name: go.mongodb.org/mongo-driver/v2
      dependency-version: 2.8.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: other-dependencies
    - dependency-name: go.mongodb.org/mongo-driver/v2
      dependency-version: 2.8.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: other-dependencies
    - dependency-name: go.mongodb.org/mongo-driver/v2
      dependency-version: 2.8.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: other-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 11, 2026
    Configuration menu
    Copy the full SHA
    9f0fa2d View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2026

  1. fix(duration): fix panic with trailing space, added fuzz (#281)

    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    f33c701 View commit details
    Browse the repository at this point in the history
  2. test(fuzz): added systematic fuzzing of formats (#282)

    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    7f8ff38 View commit details
    Browse the repository at this point in the history
  3. fix(base64): use standard RFC 4648 alphabet on the text path (#87) (#283

    )
    
    strfmt.Base64 maps to OpenAPI `format: byte`, which OAI v2 defines as unqualified
    "base64 encoded characters".
    
    Per RFC 4648, unqualified "base64" is the standard alphabet (section 4, `+/`);
    base64url (section 5, `-_`) is a separately named encoding the RFC says must not be called "base64".
    
    Eight of the nine Base64 serialization paths already used StdEncoding (String,
    MarshalJSON/UnmarshalJSON, Scan/Value, MarshalBSON/UnmarshalBSON).
    
    The lone outlier was the encoding.TextMarshaler/TextUnmarshaler pair, which used URLEncoding since PR #57.
    
    The result: the same Base64 value serialized to a query parameter (text) versus a JSON body encoded differently
    whenever the payload hit alphabet index 62/63, breaking opaque tokens that cross boundaries.
    
    Route every path through a single seam, `base64Encoding = base64.StdEncoding`,
    so the whole type now uses standard base64 and there is exactly one place to
    introduce a URL-safe variant later (see the type-parameterization work). The
    misleading "URLEncoding alphabet" godoc is corrected.
    
    Behavioral change (patch-level spec-conformance fix): the text path now emits
    and accepts standard base64. base64url text that previously round-tripped via
    UnmarshalText will now be rejected. In practice this was rarely hit because
    consumers marshal via JSON even for parameters.
    
    * fixes #87
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    fredbi and claude authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    4de561f View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2026

  1. feat(duration): add ISO 8601 / RFC 3339 duration format (duration-iso…

    …8601) (#284)
    
    * closes #278
    
    Adds first-class support for the JSON Schema draft 2020-12 "duration" format
    (RFC 3339 Appendix A: P1Y2M3DT4H5M6S, P2W, ...) alongside the existing
    human-readable Duration, without breaking it.
    
    Type & parser
    - New generic type ISODuration[P ISODurationPolicy] with phantom, zero-size
      policies DurationStrict / DurationLenient, and the strict alias
      DurationISO8601 = ISODuration[DurationStrict].
    - Single-pass, zero-allocation parser enforcing strict RFC 3339 App. A by
      default (component ordering & anchoring, W-exclusivity, ASCII digits, no
      fraction/sign/whitespace). Per-rule leniency is opt-in on the explicit
      ParseISO8601Duration(s, ...opts) path only -- never the registry/struct-field
      decode path, which must stay unambiguous.
    - Overflow handled with the stdlib/duration.go discipline: bound the integer
      part to 1<<63 before multiplying, then check after the fractional add, so
      the fraction path cannot silently wrap (MaxInt64/MinInt64 are exact).
    
    Serialization
    - JSON, Text (policy-aware emit: a strict value errors rather than emit output
      a strict parser would reject; String stays lossless for display), SQL
      (Scan/Value as int64 nanoseconds), and BSON.
    - BSON is treated as a storage boundary (lossless via String + a lenient
      parse-back), so values a strict policy refuses to emit on the text/JSON path
      (a sign, sub-second precision) still round-trip through storage.
    
    Registration
    - Registered under the distinct handle "duration-iso8601"; "duration" keeps
      mapping to the human-readable Duration (non-breaking).
    - Registered under the distinct handle "duration-human": the "human
      readable" (existing duration)
    - Modified the existing Default Registry so that "duration-human"
      remains the default mapping for "duration"
    - Added a new pre-built Registry (JSONSchema2020Registry) for which "duration-iso8601"
      becomes the default mapping for "duration"
    
    Prerequisites:
    - Prerequisite refactor: MapStructureHookFunc now decodes via
      encoding.TextUnmarshaler (reflect.New + UnmarshalText), removing the
      hand-maintained decodeFormatFromString switch so new formats need no edits
      there and the json / mapstructure paths stop diverging.
    
    Other additions:
    - conv.DurationISO8601 / conv.DurationISO8601Value helpers.
    
    Tests & tooling
    - Strict parser passes all 36 cases of the vendored JSON Schema Test Suite
      (testdata/jsonschema-suite/duration.json); plus lenient/options/value-
      semantics/overflow, registry/SQL/BSON, and a fuzz corpus (temporal bucket,
      including overflow boundaries).
    - Postgres / MariaDB / Mongo (both the bsonlite and real-driver codecs)
      integration tests.
    - Benchmarks confirm zero-alloc parsing in the same order of magnitude as
      time.ParseDuration. Also fixes benchmarkIs to rotate its input set (b.Loop()
      keeps b.N constant during the loop, so the prior index pinned one element).
    - Add testable examples for the ISO 8601 duration format.
      This documents the new API surface introduced with the duration-iso8601 format
      as godoc-rendered runnable examples (external strfmt_test package):
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    a9ba012 View commit details
    Browse the repository at this point in the history
  2. feat: new formats for currencies (ISO-4217 alpha-3) and countries (IS…

    …O-3166 alpha-3 & alpha-2) (#285)
    
    These formats are non-standard additions (for jsonschema or openapi) but
    support well-known standards.
    
    * closes #58
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi authored Jul 14, 2026
    Configuration menu
    Copy the full SHA
    12fcdc1 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2026

  1. Doc: typo in Readme

    Thank you @ccoVeille
    fredbi authored Jul 16, 2026
    Configuration menu
    Copy the full SHA
    09c6110 View commit details
    Browse the repository at this point in the history
  2. Add comments for ISO 3166 countries source data

    Added comments for source data and credits. Thanks @ccoVeille
    fredbi authored Jul 16, 2026
    Configuration menu
    Copy the full SHA
    a98cfd0 View commit details
    Browse the repository at this point in the history
  3. chore: prepare release v0.27.0

    Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    bot-go-openapi[bot] authored and github-actions[bot] committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    8364821 View commit details
    Browse the repository at this point in the history
Loading
⌂ 换网址