okapi-operation-0.3.0-rc1
Pre-release
Pre-release
·
16 commits
to master
since this release
[0.3.0-rc1] - 2023-12-03
Notable changes
axum
integration updated to be used with axum 0.7. Also this makes library unusable with older versions ofaxum
;OpenApiBuilder
rewritten, now providing more safe API to inner specification;- Simplified usage of
axum-integration::Router
- it is now unnecessary to provideOpenApiBuilder
.
Added
- New methods for
OpenApiBuilder
for setting variuos fields in inner specification; OpenApiBuilder::build()
method for building specification (replacedgenerate_spec()
);OpenApiBuilder
insideaxum-integration::Router
, which allow to omit explicit vreation of builder;- New methods in
axum-integration::Router
:set_openapi_builder_template
- replaceOpenApiBuilder
insideRouter
;update_openapi_builder_template
- updateOpenApiBuilder
insideRouter
;openapi_builder_template_mut
- get mutable reference toOpenApiBuilder
fromRouter
;generate_openapi_builder
- generateOpenApiBuilder
fromRouter
;- (!)
finish_openapi
- builder OpenAPI specification, mount it to path and returnaxum::Router
(replacesroute_openapi_specification
method).
Changed
- (breaking)
axum
integration types updated to be used with axum 0.7.
Removed
- (breaking)
set_openapi_version
, because underlying library compatible only with OpenAPI3.0.x
(x
is 0 to 3, changes between versions minor). Now generated specification always have OpenAPI version3.0.0
; - (breaking) Bunch of old methods from
OpenApiBuilder
; - (breaking)
axum-integration::Router::route_openapi_specification()
(replaced byfinish_openapi
method).
Fixed
- (breaking)
OpenApiBuilder::add_operations
now use passed paths as is. Previously it converted it fromaxum
format to OpenAPI, which could mess up integration with another framework. This change does not affectaxum
integration; - (breaking) Feature
axum-integration
disabled by default, it was enabled by mistake previously; - Minor documentation fixes.
Full Changelog: okapi-operation-0.2.2...okapi-operation-0.3.0-rc1