Releases: oaswrap/spec
Releases · oaswrap/spec
v0.5.1
Added
- Logger debug feature for tracing spec generation behavior.
InterceptSchemaandInterceptPropreflector hooks for customizing schema and property generation.RequiredPropByValidateTaghook for marking fields required based onvalidatestruct tags.ParentTypefield onInterceptPropParamsfor richer hook context.- Automatic content-type detection from struct type when not explicitly set.
encoding.TextMarshaler/TextUnmarshalersupport: types implementing both interfaces (withoutjson.Marshaler) are reflected astype: string.EmbedReferencerinterface andrefer:"true"struct tag: embedded structs opt intoallOf $refinstead of field inlining.ParameterTagMappingnow acceptsopenapi.ParameterInBodyandopenapi.ParameterInFormto override the struct tag used for JSON and form request body field names (defaults:jsonandform).
Changed
- Schema component names now always include the Go package name as a prefix (e.g.,
models.User→ModelsUser). This eliminates cross-package naming collisions without requiring caller-package detection. UseInterceptDefNameorStripDefNamePrefixto remove the prefix if desired. DefNameCallerPkgfield removed fromReflectorConfig; the caller-package detection mechanism inNewGeneratoris removed.- Package name sanitization handles multi-segment names (e.g.,
spec_test→SpecTest); unexported type names are title-cased when a package prefix is prepended.
Fixed
uint8/uint16reflected asint32format;uint/uint32/uint64/uintptrreflected asint64format.InterceptSchema/InterceptProphook error propagation and correctness.RefSchemapre-hook: assignStructSchemafields onto existing pointer so pre-hook customizations (extensions, description) survive to the post-hook.ApplyNullable(OAS 3.1+): merge"null"into an existing[]stringtype slice instead of silently skipping.- Lint violations and YAML tag reading in
MarshalYAML.
Full Changelog: v0.5.0...v0.5.1
v0.5.0
Added
- OpenAPI 3.2.0 support and expanded version-specific validation checks.
- Validation severity levels (
Error,Warning,Info) with best-practice reporting. ValidateReportsupport 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-urlencodedquerystring 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
httprouterfrom 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
v0.4.1
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
- @dependabot[bot] made their first contribution in #49
- @shulutkov made their first contribution in #51
Full Changelog: v0.4.0...v0.4.1
v0.4.0
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
oneOfentry. - 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
- @oscarbc96 made their first contribution in #44
Full Changelog: v0.3.6...v0.4.0
v0.3.6
What's Changed
- fix: echo route syntax uses
:idnot{id}by @overthink in #39 - feat: add custom parameter tag config by @akfaiz in #41
New Contributors
- @overthink made their first contribution in #39
Full Changelog: v0.3.5...v0.3.6
v0.3.5
What's Changed
- Add ability to configure encoding object for request bodies by @GamerGirlandCo in #35
- chore: update readme link by @akfaiz in #37
New Contributors
- @GamerGirlandCo made their first contribution in #35
Full Changelog: v0.3.4...v0.3.5