Skip to content

Releases: oaswrap/spec

v0.5.1

12 May 03:47

Choose a tag to compare

Added

  • Logger debug feature for tracing spec generation behavior.
  • InterceptSchema and InterceptProp reflector hooks for customizing schema and property generation.
  • RequiredPropByValidateTag hook for marking fields required based on validate struct tags.
  • ParentType field on InterceptPropParams for richer hook context.
  • Automatic content-type detection from struct type when not explicitly set.
  • encoding.TextMarshaler/TextUnmarshaler support: types implementing both interfaces (without json.Marshaler) are reflected as type: string.
  • EmbedReferencer interface and refer:"true" struct tag: embedded structs opt into allOf $ref instead of field inlining.
  • ParameterTagMapping now accepts openapi.ParameterInBody and openapi.ParameterInForm to override the struct tag used for JSON and form request body field names (defaults: json and form).

Changed

  • Schema component names now always include the Go package name as a prefix (e.g., models.UserModelsUser). This eliminates cross-package naming collisions without requiring caller-package detection. Use InterceptDefName or StripDefNamePrefix to remove the prefix if desired.
  • DefNameCallerPkg field removed from ReflectorConfig; the caller-package detection mechanism in NewGenerator is removed.
  • Package name sanitization handles multi-segment names (e.g., spec_testSpecTest); unexported type names are title-cased when a package prefix is prepended.

Fixed

  • uint8/uint16 reflected as int32 format; uint/uint32/uint64/uintptr reflected as int64 format.
  • InterceptSchema/InterceptProp hook error propagation and correctness.
  • RefSchema pre-hook: assign StructSchema fields onto existing pointer so pre-hook customizations (extensions, description) survive to the post-hook.
  • ApplyNullable (OAS 3.1+): merge "null" into an existing []string type slice instead of silently skipping.
  • Lint violations and YAML tag reading in MarshalYAML.

Full Changelog: v0.5.0...v0.5.1

v0.5.0

11 May 02:14

Choose a tag to compare

Added

  • OpenAPI 3.2.0 support and expanded version-specific validation checks.
  • Validation severity levels (Error, Warning, Info) with best-practice reporting.
  • ValidateReport support across the core router and all adapters.
  • Dirty-state tracking for incremental build behavior.
  • Automatic injection of missing path parameters.
  • Support for application/x-www-form-urlencoded querystring parameter content.
  • Media type tag support in schema reflection.
  • New Iris adapter: irisopenapi.

Changed

  • Rebuilt core generator, reflector, and validator internals.
  • Aligned all adapters with the updated core behavior.
  • Upgraded OpenAPI handling to improve version consistency and validation behavior (including 3.1.2 alignment).
  • Prefixed package name in default schema definition names.
  • Centralized operation method validation logic.

Fixed

  • Hardened path and HTTP method generation behavior.

Removed

  • Removed httprouter from the supported adapter list.
  • Removed dependency on external OpenAPI generator packages (including github.com/swaggest/openapi-go) as part of the core generator rebuild.

Full Changelog: v0.4.2...v0.5.0

v0.4.2

22 Apr 04:11
11a83f3

Choose a tag to compare

What's Changed

  • fix: failed unit test at echov5 adapter due library changes by @akfaiz in #55
  • chore: bump version swaggest/openapi-go to v0.2.61 by @akfaiz in #56
  • fix: shorten generic type definition names in JSON schema by @akfaiz in #57

Full Changelog: v0.4.1...v0.4.2

v0.4.1

12 Apr 11:10
b5985af

Choose a tag to compare

What's Changed

  • chore(deps): bump github.com/gofiber/fiber/v2 from 2.52.9 to 2.52.12 in /adapter/fiberopenapi by @dependabot[bot] in #49
  • fix: can't use trailing slash in URL path by @shulutkov in #51
  • chore(deps): bump github.com/labstack/echo/v5 from 5.0.2 to 5.0.3 in /adapter/echov5openapi by @dependabot[bot] in #53
  • feat: strip trailing slash config by @akfaiz in #52

New Contributors

Full Changelog: v0.4.0...v0.4.1

v0.4.0

05 Apr 09:26

Choose a tag to compare

Summary

Minor release with new adapters, Spec UI improvements, response-handling consolidation, and release tooling updates.

Highlights

  • New adapter: Added Fiber v3 adapter (fiberv3openapi).
  • New adapter: Added Echo v5 adapter (echov5openapi).
  • Spec UI: Upgraded Spec UI to v0.2.0 and added custom spec-ui option support.
  • Responses: Merged duplicate status-code responses into a single oneOf entry.
  • Bugfix: Fixed asset-handler registration when using embedded UI.
  • Release tooling: Improvements to release preflight and release commands.

What's Changed

  • feat: merge duplicate status code responses into oneOf by @oscarbc96 in #44
  • feat: add Echo v5 adapter by @oscarbc96 in #43
  • feat: adjust release command by @akfaiz in #46
  • feat: add Fiber v3 adapter (fiberv3openapi) by @akfaiz in #47
  • feat: add custom spec-ui option support and upgrade spec-ui to v0.2.0 by @akfaiz in #48

New Contributors

Full Changelog: v0.3.6...v0.4.0

v0.3.6

05 Nov 15:54
f4f3857

Choose a tag to compare

What's Changed

  • fix: echo route syntax uses :id not {id} by @overthink in #39
  • feat: add custom parameter tag config by @akfaiz in #41

New Contributors

Full Changelog: v0.3.5...v0.3.6

v0.3.5

25 Oct 13:23

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.3.4...v0.3.5

v0.3.4

17 Oct 01:22
0592ef4

Choose a tag to compare

What's Changed

  • feat: add httprouter adapter by @akfaiz in #31
  • feat: add precommit and linter config by @akfaiz in #32

Full Changelog: v0.3.3...v0.3.4

v0.3.3

12 Aug 13:45
15b147b

Choose a tag to compare

What's Changed

  • feat: remove built-in doc handler at spec by @afkdevs in #27
  • feat: disable spec cache by @afkdevs in #28
  • fix: security issue by @afkdevs in #29
  • fix: github action security by @afkdevs in #30

Full Changelog: v0.3.2...v0.3.3

v0.3.2

10 Aug 10:56
fed9993

Choose a tag to compare

What's Changed

  • feat: refactor ui to support multi provider by @afkdevs in #26

Full Changelog: v0.3.1...v0.3.2