Open efectn opened 3 days ago
The changes encompass enhancements to the Fiber framework's binding functionalities, including the introduction of default values for query parameters, headers, and cookies. The import paths for the schema
package have been updated, transitioning from internal to public access. Several files related to schema processing, such as caching, encoding, and decoding, have been removed, streamlining the framework. Documentation has been expanded to include examples of the new default field capabilities, ensuring clarity for developers.
File(s) | Change Summary |
---|---|
bind_test.go |
Added Default and Defaults fields to Query2 and Header2 structs; expanded tests for binding logic with default values. |
binder/mapping.go , error.go , error_test.go |
Updated import path for the schema package from internal to public; no changes in functionality. |
docs/api/bind.md |
Expanded documentation to include a new section on "Default Fields" with examples of default values. |
internal/schema/* |
Removed multiple files related to caching, encoding, and decoding, including associated types and methods. |
sequenceDiagram
participant Client
participant Fiber
participant Schema
Client->>Fiber: Send request with parameters
Fiber->>Schema: Decode parameters into struct
Schema->>Fiber: Return populated struct
Fiber->>Client: Respond with processed data
🐇 "In the meadow where bunnies play,
New defaults have come to stay.
With headers and queries, oh what a treat,
Binding made simple, oh so neat!
Hopping along, we celebrate,
Fiber's enhancements, truly great!" 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.50%. Comparing base (
44cd700
) to head (54778a2
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@efectn Did you add the changes we had here to gofiber/schema?
@efectn Did you add the changes we had here to gofiber/schema?
Yes i've added
Description
Replace internal/schema with https://github.com/gofiber/schema which is fork of gorilla/schema.
Changes introduced
Type of change
Checklist
Before you submit your pull request, please make sure you meet these requirements:
/docs/
directory for Fiber's documentation.Commit formatting
Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md