git.iko.soy/typeable/openapi3
on master help sign in
Bump version to 2.2.1
0416aeeOleg Grenrus
CHANGELOG.md+6−2
@@ -1,8 +1,12 @@
1−next
1+2.2.1
2−----
2+-----
3
3
4* Add `Semigroup` instances
4* Add `Semigroup` instances
5* GHC-8.4 compatibility
5* GHC-8.4 compatibility
6+* `Schema (NonEmpty a) instance (see [#141](https://github.com/GetShopTV/swagger2/pull/141))
7+* Fix optional property for unary records (see [#142](https://github.com/GetShopTV/swagger2/issues/142))
8+* Add `fromAesonOptions` helper (see [#146](https://github.com/GetShopTV/swagger2/issues/139))
9+* Fix non-termination when using `datatypeNameModifier` with recursive data types (see [#132](https://github.com/GetShopTV/swagger2/issues/132))
6
10
72.2
112.2
8---
12---
src/Data/Swagger/Internal/Schema.hs+1
@@ -562,6 +562,7 @@ instance ToSchema a => ToSchema (Set a) where
562
562
563instance ToSchema a => ToSchema (HashSet a) where declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy (Set a))
563instance ToSchema a => ToSchema (HashSet a) where declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy (Set a))
564
564
565+-- | @since 2.2.1
565instance ToSchema a => ToSchema (NonEmpty a) where
566instance ToSchema a => ToSchema (NonEmpty a) where
566 declareNamedSchema _ = do
567 declareNamedSchema _ = do
567 schema <- declareSchema (Proxy :: Proxy [a])
568 schema <- declareSchema (Proxy :: Proxy [a])
src/Data/Swagger/SchemaOptions.hs+3
@@ -60,6 +60,9 @@ defaultSchemaOptions = SchemaOptions
60-- * 'Aeson.tagSingleConstructors'
60-- * 'Aeson.tagSingleConstructors'
61--
61--
62-- The rest is defined as in 'defaultSchemaOptions'.
62-- The rest is defined as in 'defaultSchemaOptions'.
63+--
64+-- @since 2.2.1
65+--
63fromAesonOptions :: Aeson.Options -> SchemaOptions
66fromAesonOptions :: Aeson.Options -> SchemaOptions
64fromAesonOptions opts = defaultSchemaOptions
67fromAesonOptions opts = defaultSchemaOptions
65 { fieldLabelModifier = Aeson.fieldLabelModifier opts
68 { fieldLabelModifier = Aeson.fieldLabelModifier opts
swagger2.cabal+1−1
@@ -1,5 +1,5 @@
1name: swagger2
1name: swagger2
2−version: 2.2
2+version: 2.2.1
3synopsis: Swagger 2.0 data model
3synopsis: Swagger 2.0 data model
4description:
4description:
5 This library is inteded to be used for decoding and encoding Swagger 2.0 API
5 This library is inteded to be used for decoding and encoding Swagger 2.0 API