mirror of
https://github.com/poem-web/poem.git
synced 2026-01-24 20:08:49 +00:00
24 KiB
24 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.
[5.1.15] 2025-06-06
- Bump
derive_moreto2.0 - Fix webhook nesting #1031
- add support for num::NonZero #1041
- Support deep linking in Swagger UI #1049
- Add support to externally tagged unions #1043
[5.1.14] 2025-05-03
- add scalar ui support #1019
- support
DurationandTimestampfromprost_wkt_types#1016 - Object fields deprecation #1026
- add support for server variables #962
[5.1.12] 2025-03-30
- the
Binarytype no longer requirescontent-typeto beapplication/octet-stream.
[5.1.11] 2025-03-29
- feat:
ignore_caseparameter inOpenApimacro can be used to operation.
[5.1.10] 2025-03-29
- feat: add
ignore_caseparameter forOpenApimacro.
[5.1.9] 2025-03-24
- fix(openapi): do not use
cookiefeature by default #986 - fix: guard cookie features behind feature toggle #997
- Support rename in NewType #964
- fix(openapi): exclude style parameter when serializing if none #989
- fix(poem-openapi): handle additional_properties correctly in flatten #961
- fix(poem-openapi-derive): Allow different path param names on same route #952
- Update MSRV to
1.85.0
[5.1.6] 2025-02-21
- Allows passing the style of a parameter in the openapi spec. #940
- Add support for Stoplight Elements #954
- Correct server object reference URL anchor #957
- feat(openapi): reflect fallback security scheme in spec #958
- Fix missing condition for Stoplight Elements UI #972
- Update MSRV to
1.83.0
[5.1.5] 2025-01-04
- Add description to Union descriminator object schema #921
- make Json from poem-openapi derive Default because Json from poem does #938
- Pass
ParsePayload<T>::IS_REQUIREDtoTinstead of defaulting totrue#932 - allow path in status for ApiResponse #937
[5.1.4] 2024-11-25
- Assign the description to the request object in OpenAPI #886
- Implemented nullable fields for openapi spec generation #865
- refactor: change type name delimiters from
<>()[]to_#904
[5.1.3] 2024-11-20
- Update MSRV to
1.81.0
[5.1.2] 2024-10-02
- implements
SerializeandDeserializeforpoem_openapi::types::Any<T>. - add
ParseError::message methodto get the error message.
[5.1.1] 2024-09-13
- fix #883
[5.1.0] 2024-09-08
- fix read_only_with_default test when only default features are enabled #854
- feat: add AsyncSeek trait to Upload::into_async_read return type #853
- Added derivations for Type, ParseFromJSON and ToJSON for sqlx::types::Json. #833
- chore(openapi): bump derive_more #867
[5.0.3] 2024-07-27
- Added derivations for Type, ParseFromJSON and ToJSON for sqlx types #833
[5.0.1] 2024-05-18
- Add enum_items to discriminated union #741
- fix Union doesn't implement IsObjectType #800
- fix Union doesn't support generics in the last version #799
- Expose Poem-OpenApi Upload File struct #816
[5.0.0] 2024-03-30
- use AFIT instead of
async_trait - add
Upload::sizemethod - when
Unionuses discriminator, if the members is not anObject, an error will be reported at compile time
[4.0.1] 2024-03-04
- added example value support for param/schema #717
- Adding serialize_with and deserialize_with attributes to struct fields #749
[4.0.0] 2024-01-06
- upgrade to
hyper1 - added documentation on how to merge API specs #716
- impl Type for std::time::Duration instead of only humantime::Duration #713
[3.0.6] 2023-11-19
- add
prost-wkt-typescrate support #689 - add
geo-typescrate support #693 - count string length correctly in OpenAPI validators #666
- Support for custom hash functions for HashMap/HashSet #654
- Misplaced `</html>`` in swagger_ui HTML template #660
- for
read-onlyproperties, can usedefaultto specify a function for creating a default value. #647
fn default_offset_datetime() -> OffsetDateTime {
OffsetDateTime::now_utc()
}
#[derive(Debug, Object, PartialEq)]
struct Obj {
#[oai(read_only, default = "default_offset_datetime")]
time: OffsetDateTime,
}
[3.0.5] 2023-09-06
- fixes #648
[3.0.4] 2023-09-02
- allow using expressions as
prefix_pathparameter #635 - bump
quick-xmlfrom0.29.0to0.30.0
[3.0.3] 2023-08-18
- Add fallback support for
SecuritySchememacro used on enums
[3.0.2] 2023-08-12
- Add support for multiple authentication methods. #627
Breaking changes
- change
fn ApiExtractor::security_schemes() -> Option<&str>tofn ApiExtractor::security_schemes() -> Vec<&str>
[3.0.1] 2023-08-02
- openapi: allows multiple security schemes on one operation #621
[3.0.0] 2023-06-21
- bump
synfrom1.0to2.0 - bump
darlingfrom0.14to0.20 - feat: introduce idle timeout #603
Breaking Changes
-
Since
syn 2.0no longer supports keywords as meta path, renamed some parameters in macros.Macro Old Name New Name SecuritySchema type ty SecuritySchema in key_in ApiResponse.header type ty https://github.com/dtolnay/syn/issues/1458 https://github.com/TedDriggs/darling/issues/238
-
Change
ApiExtractor::TYPEtoApiExtractor::TYPESto allow implementing multiple extractor in single type.
[2.0.27] 2023-06-06
- feat: Implement Type on the char primitive #518
- Pattern matching in OpenAPI function args #517
- chore: add Clone for
OpenApiService#527 - Fix
#[derive(Multipart)]for struct, so it will work with#[derive(ApiRequest)]#551 - feat: Allow more types to be prased into strings #545
- Support for ipnet crate + IpAddr #544
[2.0.24] 2023-01-31
[2.0.23] 2023-01-13
- Add the missing feature
openapi-explorerinuimod #480 - Add yaml support #476
- Remove
poem_openapi::response::StaticFileResponseand implementApiResponse traitforpoem::web::StaticFileResponse
[2.0.22] 2023-01-11
- Add support for OpenAPI Explorer #440
- Add
Ipv4AddrandIpv6Addropenapi support #442 - Parse Value(Number) into Decimal #452
- Parse other number types as well and fix float #454
- Responses generated by the
ApiResponsemacro have correct error messages when converted topoem::Error
[2.0.21] 2022-12-01
- Add generic support to the
NewTypemacro - Fixes #436
[2.0.20] 2022-11-21
- Bump quick-xml to
0.26.0 - Fixes #429
[2.0.19] 2022-10-25
[2.0.18] 2022-10-19
[2.0.17] 2022-10-17
- Throws an error when
flattencombination with structs that usedeny_unknown_fields
[2.0.16] 2022-10-07
- Fixes #405
[2.0.11] 2022-08-30
- Add
EventStream::to_eventmethod to set a function used to convert the message to SSE event. #378 - OpenApi XML support #354
- Add
hiddenattribute for the operation #376
[2.0.10] 2022-08-16
- Add the
defaultattribute to Object macro. #369
[2.0.9] 2022-08-16
[2.0.8] 2022-08-12
[2.0.7] 2022-08-02
- Expose
AttachmentTypeenum #344 - Add
rename_allattribute forUnionmacro #347 - Change the default attachment type to
attachment#325 - Update
serde_yamlto 0.9.0 #352
[2.0.6] 2022-07-26
- Use first line of comment as title of newtype param #319
- Add
Content-Dispositionheader to schema forAttachment#325 - Add support for
x-code-samples#335 - Return
400when parsing path fails, not404#326 - Use Parent_Child instead of Parent[Child] for generated intermediate type #340
- Fixed docs for
NewTypemacro
[2.0.5] 2022-07-16
- Add support for specifying contact field #306
- Add
actual_typeattribute toOpenApi,Response,ResponseContentmacros #314
[2.0.4] 2022-07-12
[2.0.3] 2022-07-10
- Add integrate with the
timecrate. - Add support generating openapi UI html through the dedicated function. #298
[2.0.1] 2022-06-17
- Add support for getting the spec as YAML #287
- Add optional support for humantime Duration in poem Object #293
[2.0.0] 2022-05-30
- Publish
Poem-openapi v2.0.0🙂
[2.0.0-alpha.2] 2022-05-20
- Re-added the
exampleattribute forObjectmacro. - Response
404 NOT FOUNDwhen parsing path parameters fails. #279
[2.0.0-alpha.1] 2022-05-15
- Remove
inlineandconcreteattributes ofObjectandUnionmacros, now automatically generate reference names for generic objects.
[1.3.28] 2022-04-16
- If the
inlineorconcretesattribute of the generic object is not specified, the exact error will be reported at compile time.
[1.3.28] 2022-04-15
- Add support for generic union. #259
[1.3.26] 2022-04-14
- Fixed
poem::web::StaticFileResponseconversion topoem_openapi::respoinse::StaticFileResponsemissingContent-Typeheader.
[1.3.25] 2022-04-13
- Downgrades the
indexmapdependency to1.6.2to resolve https://github.com/tkaitchuck/aHash/issues/95
[1.3.23] 2022-4-11
- Implement
Typeforchrono::NaiveDateTime,chrono::NaiveDate,chrono::NaiveTime#252
[1.3.20] 2022-4-1
- Fixed
#[oai(default)]not working with operation parameters. - Add
MaybeUndefined::update_tomethod.
[1.3.18] 2022-3-24
- Generate responses in schema when
ApiResponseas an error. #244
[1.3.17] 2022-3-23
- Implement
From<T: ApiResponse>forpoem::Errorso that it can be used as error type.
[1.3.14] 2022-3-10
- Add support for use multiple methods on a single endpoint. #229
[1.3.13] 2022-3-10
- Normalize decimals in responses. #228
[1.3.12] 2022-3-9
- Add support for extra request/response headers.
[1.3.11] 2022-3-9
- Add support for extra headers.
[1.3.10] 2022-3-7
- Add support generic for
OpenAPImacro. #216
[1.3.9] 2022-3-7
- Add
skip_serializing_if_is_none,skip_serializing_if_is_emptyandskip_serializing_ifattributes toObjectmacro. #220
[1.3.7] 2022-3-1
- Implement
Typeforrust_decimal::Decimal. #214
[1.2.58] 2022-2-15
- Add support for deriving remote objects to the
Objectmacro. - Add
poem_openapi::payload::Base64.
[1.2.57] 2022-2-10
- Implement
From<T>,IntoIteratorforMaybeUndefined<T>. - Add
MaybeUndefined::from_opt_undefined,MaybeUndefined::from_opt_null,MaybeUndefined::as_ref,MaybeUndefined::as_derefmethods.
[1.2.56] 2022-2-10
- Implement
ToJsonforMaybeUndefined.
[1.2.55] 2022-2-10
- Add
MaybeUndefinedtype.
[1.2.53] 2022-2-3
- Fix OpenAPI doesn't work with tracing::instrument. #194
[1.2.51] 2022-1-31
- Fix unsupported media-type (415) instead of method not allowed (405). #188
- Integrate with
bson::oid::ObjectId. #185
[1.2.50] 2022-1-29
- Make the
ApiRequestmacro exactly match the mime type.
[1.2.48] 2022-1-29
- Add
Htmlpayload type. - Add
StaticFileResponsetype.
[1.2.46] 2022-1-26
- Fixed stack overflow on recursive structures. #184
[1.2.43] 2022-1-22
- Fixed
EventStreamnot registering internal types. - OpenApi schemas generated by the
Unionmacro are no longer inlined by default.
[1.2.41] 2022-1-21
- Set Rapidoc's
schema-description-expandedoption totrue.
[1.2.40] 2022-1-21
- Add
flattenattributeforObjectmacro.
[1.2.38] 2022-1-19
- Fix stack overflow when generating schema for structure references Self. #171
[1.2.36] 2022-1-17
- Add
HashSetandBTreeSetsupport to OpenAPI. #167 - Add
Urlsupport to OpenAPI. #168 - Breaking change: Remove
OneOfmacro and addUnionmacro, and replaceproperty_namewithdiscriminator_name.- The implementation of
OneOfwas incorrect. To migrate, change all instances ofOneOftoUnion, and all instances ofproperty_nametodiscriminator_name.
- The implementation of
[1.2.34] 2022-1-14
- Add
deprecatedattribute toApiResponse's header field.
[1.2.33] 2022-1-12
- Fixed the
externalDocsfield name is incorrect in the specification.
[1.2.32] 2022-1-12
- Add
ToJSON::to_json_stringmethod.
[1.2.31] 2022-1-12
- Add support for custom validator.
- Add
external_docsattribute for some macros. - Add
ParseFromJSON::parse_from_json_stringmethod.
[1.2.29] 2022-1-11
- Add
NewTypemacro. #159
[1.2.27] 2022-1-8
- Add
ResponseContentmacro.
[1.2.25] 2022-1-4
- Add
deprecatedattribute toEnummacro.
[1.2.24] 2022-1-4
- Add
OpenApiService::summarymethod.
[1.2.21] 2022-1-1
- The
OneOfmacro no longer automatically implementsserde::Serializeandserde::Deserializetraits.
[1.2.20] 2021-12-31
- The
Objectmacro no longer automatically implementsserde::Serializeandserde::Deserializetraits.
[1.2.18] 2021-12-31
- Fix generates a field with #[oai(default)] marked as required even though it isn't. #145
[1.2.17] 2021-12-29
- Add
EventStream::keep_alivemethod.
[1.2.11] 2021-12-27
- Remove the
OpenApi::combinemethod,OpenApiService::newcan be passed a tuple to combine multiple API objects.
[1.2.10] 2021-12-26
- The
content_typeattribute of theApiRequestmacro supports wildcards. - Add
EventStreampayload. - Implement
Typeforserde_json::Value.
#[derive(ApiRequest)]
enum UploadImageRequest {
#[oai(content_type = "image/jpeg")]
Jpeg(Binary<Vec<u8>>),
#[oai(content_type = "image/png")]
Png(Binary<Vec<u8>>),
#[oai(content_type = "image/*")]
Other(Binary<Vec<u8>>),
}
[1.2.8] 2021-12-21
- Added the
content_typeattribute to theApiRequestandApiResponsemacros to specify the content type of the request or response. - Panic occurs when a duplicate operation id is detected.
- Add
OpenApiService::external_documentmethod to referencing an external resource for extended documentation. - Add
Webhookmacro to define webhooks. - Implement
OpenApifor()to define an empty APIs.
[1.2.7] 2021-12-19
- Make the
OpenAPImacro can now report duplicate routing errors.
[1.2.4] 2021-12-18
- Fix the parameter validator will cause compilation failure in some cases.
[1.2.4] 2021-12-17
- Add
remoteattribute toEnummacro. - Remove the
BinaryStreamtype, usepoem::Bodyinstead. - Do not rename any types by default. #128
[1.1.1] 2021-12-12
- Add
BinaryStream::from_bytes_streamandBinaryStream::to_bytes_streammethods.
[1.0.51] 2021-12-12
- Add some methods to specify more API metadata.
- Add
Responsetype, use it to modify the status code and HTTP headers.
[1.0.50] 2021-12-11
- impl
ParseFromParameterfor [T; const LEN: usize]. - Add
exampleattribute forObjectmacro. - Add
deny_unknown_fieldsattribute forObjectandMultipartmacros.
[1.0.49] 2021-12-10
- Add
Email/Hostnametypes. - Integrate with the
regex,uuid. - Implement
TypeforUri. - Implement
TypeforDateTime<Utc>andDateTime<Local>. - Add support for Redoc.
[1.0.48] 2021-12-10
- Remove the
PoemExtractortype because it is no longer needed.
[1.0.47] 2021-12-10
- Add
Attachmentpayload for download file. - Added
BinaryStreamto support streaming payload.
[1.0.46] 2021-12-10
- Change the default renaming rule of enum items from
ScreamingSnaketoPascal.
[1.0.45] 2021-12-09
- Remove the
descattribute of the response header inApiResponsemacro, and use rustdoc to add the header description. - Implement
ParseFromParameterforVec<T>.
[1.0.44] 2021-12-08
- Remove the
listattribute of the validator, it is no longer needed. - Add
maxPropertiesandminPropertiesvalidators. - Add support to API operation with optional payload.
- Add support to API responses with optional header.
[1.0.43] 2021-12-07
- Change the schema type of enum to
string#121
[1.0.42] 2021-12-07
- Implement
Typefor&[T],&Tand[T; const N: usize]. - Add support for returning references from API operation functions.
[1.0.41] 2021-12-07
- Fixed the bug that
Arc,Box,BTreeMapandHashMapdid not register subtypes.
[1.0.40] 2021-12-07
- Add support for
additionalProperties.
[1.0.39] 2021-12-07
- Rework implement
TypeforHashMapandBTreeMap.
[1.0.38] 2021-12-07
- Implement
TypeforBox<T>,Arc<T>,HashMap<K, V>andBTreeMap<K, V>. #116
[1.0.37] 2021-12-06
- Add support for RapiDoc.
- Remove the
descattribute of the operation parameter inOpenAPImacro, and use rustdoc to add the parameter description.
[1.0.35] 2021-12-05
- If an OpenAPI name conflict is detected when creating schema, it will cause panic.
[1.0.33] 2021-11-30
-
Remove
akasmafrom dependencies. -
[1.0.31] 2021-11-30
-
#[oai(validator(list))]no longer applies tomax_items,min_itemsandunique_items.
[1.0.29] 2021-11-22
- Add
listattribute to the validator. - Rework
OpenAPImacro.
[1.0.28] 2021-11-17
- Omit empty security schemas from OpenAPI document. #93
[1.0.27] 2021-11-16
- Description is a required field for responses. #86
[1.0.26] 2021-11-15
- Add
versionandtitleparameters toOpenAPIService::new. #87
[1.0.19] 2021-11-03
- Add
checkerattribute forSecuritySchememacro. - Use Rust 2021 edition.
[1.0.18] 2021-11-02
- Some configurations no longer need
'static.
[1.0.12] 2021-10-27
- Correctly determine the type of payload.
[1.0.11] 2021-10-27
- Bump
poemto1.0.11.
[1.0.10] 2021-10-26
- Make the return type of operation function more flexible.
[1.0.9] 2021-10-26
- Add
Anytype.
[1.0.8] 2021-10-25
- Add
read_only_allandwrite_only_alltoObjectArgs. #71
[1.0.7] 2021-10-21
- Fix Json parsing not working for unsigned integers. #68
[1.0.4] 2021-10-15
- Bump
poemfrom1.0.3to1.0.4.
[1.0.3] 2021-10-14
- Add
prefix_pathandtagattributes for#[OpenApi]. #57 OpenApiService::swagger_uimethod no longer needs theabsolute_uriparameter.- Add
inlineattribute forObjectmacro. - Add generic support for
ApiRequestandApiResponsemacros.
[1.0.2] 2021-10-11
- Add
write_onlyandread_onlyattributes for object fields. - Add
OpenApiService::specmethod to get the generated OAS specification file. - Implements
Defaulttrait forpoem_openapi::types::multipart::JsonField<T>. - Implements
ParseFromMultipartFieldfor some types.
[1.0.1] 2021-10-10
- Add
Request::remote_addrmethod.