mirror of
https://github.com/davidebianchi/gswagger.git
synced 2025-12-23 23:38:43 -05:00
4.0 KiB
4.0 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.10.1 - 06-10-2025
Refactor
- renamed swagger to openapi in error messages
0.10.0 - 28-02-2024
BREAKING CHANGES
- remove support to golang 1.19
Updated
- change jsonschema lib to use again
invopop/jsonschemaone, since now it support additionalProperties instead of patternProperties
0.9.0 - 17-04-2023
Added
- add new fields to Definition:
- Security
- Tags
- Summary
- Description
- Deprecated
- Extensions
Updated
- update kin-openapi to 0.114.0: this change removes components from exposed oas (if not manually set). In this update of kin-openapi, there is a breaking change with the T struct, which now accepts component as pointer.
0.8.0 - 23-12-2022
BREAKING CHANGES
- add
TransformPathToOasPath(path string) stringmethod to apirouter.Router interface to handle different types of paths parameters. If you use one of the supported routers, you should do nothing;
0.7.0 - 22-12-2022
This is a big major release. The main achievement is to increase the usability of this library to all the routers. Below are listed the breaking changes you should care when update the version.
BREAKING CHANGES
apirouter.NewGorillaMuxRouteris nowgorilla.NewRouter(exposed by packagegithub.com/davidebianchi/gswagger/support/gorilla).- removed
apirouter.HandlerFunc. Now it is exposed bygorilla.HandlerFunc - changed
apirouter.Routerinterface:- now it accept a generics
HandlerFuncto define the handler function - add method
SwaggerHandler(contentType string, json []byte) HandlerFunc
- now it accept a generics
NewRouterfunction now acceptHandlerFuncas generics- drop support to golang <= 1.17
GenerateAndExposeSwaggerrenamed toGenerateAndExposeOpenapi
Feature
0.6.1 - 17-11-2022
Changed
- change jsonschema lib to
mia-platform/jsonschema v0.1.0. This update removes thepatternPropertieswithadditionalPropertiesfrom all schemas - remove use of deprecated io/ioutil lib
0.6.0 - 04-11-2022
Added
- Tags support to
router.AddRouteaccepted definition
0.5.1 - 03-10-2022
Fixed
- upgrade deps
v0.5.0 - 05-08-2022
Added
- path params are auto generated if not set
v0.4.0 - 02-08-2022
Changed
- change jsonschema lib to
invopop/jsonschema v0.5.0. This updates remove theadditionalProperties: truefrom all the schemas, as it is the default value
BREAKING CHANGES
- modified Router interface by sorting addRoute arguments in a different manner: first method and then path To migrate, all the router implementation must be updated with the Router interface change.
Before:
type Router interface {
AddRoute(path, method string, handler HandlerFunc) Route
}
After:
type Router interface {
AddRoute(method, path string, handler HandlerFunc) Route
}
Updates
- kin-openapi@v0.98.0
- go-openapi/swag@v0.21.1
- labstack/echo/v4@v4.7.2
v0.3.0 - 10-11-2021
Added
- handle router with path prefix
- add SubRouter method to use a new sub router
v0.2.0 - 16-10-2021
BREAKING CHANGES
Introduced the apirouter.Router interface, which abstract the used router.
Changed function are:
- Router struct now support
apirouter.Routerinterface - NewRouter function accepted router is an
apirouter.Router - AddRawRoute now accept
apirouter.Handleriterface - AddRawRoute returns an interface instead of *mux.Router. This interface is the Route returned by specific Router
- AddRoute now accept
apirouter.Handleriterface - AddRoute returns an interface instead of *mux.Router. This interface is the Route returned by specific Router
v0.1.0
Initial release