All notable changes to this project will be documented in the changelog of the respective crates. This project follows the Semantic Versioning standard.
- Feature
axum
as replacement foraxum-integration
(now considered deprecated); - Request body detection from function arguments for specific frameworks (i.e. axum);
#[body]
attribute as replacement for#[request_body]
(now considered deprecated);ToMediaTypes
/ToResponses
implementations for string-like types (String, &'static str, ...) and bytes-like types (Bytes, Vec, ...), implemented in axum, andaxum::form::Form
.
- shorter version of
openapi_handler!
macro -oh!
.
#[body]
attribute can be used without braces;openapi_handler
in axum integration now accept function with generic parameters;- switched to using
indexmap
in place ofhashmap
to make produced specs deterministic.
- handler now accept
accept
header*/*
.
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
.
- 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).
- (breaking)
axum
integration types updated to be used with axum 0.7.
- (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).
- (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.
- The
Accept
header parsing in theaxum
integration handler is more relaxed to allow content types such as+json
,+yaml
,text/yaml
, etc. - Align the behavior of
Router::route
in theaxum
integration to merge routes with same path, rather than overwriting them.
- Serving spec in different formats in
axum
integration usingAccept
header (JSON supported by default, YAML behindyaml
feature).
axum
integration updated to be used with axum 0.6. Also this makes library unusable with older versions ofaxum
.
axum
integration types updated to be used with axum 0.6.
ComponentesBuilder
. It allows to customize components storage (schemas/security/...), for exmple disable subschemas inlining which could help when you have multiple types with same name (otherwise they will override each other in generated spec);- Method
OpenApiBuilder::set_components
for customizingComponents
.
- Cookie parameters.
- Macro
openapi_handler
now correctly handle paths.
- Macro
openapi_service
, nowopenapi_handler
can handle both functions and services.
- docs.rs features.
Initial implementation.