Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
taojang committed Mar 22, 2018
2 parents eb9255d + af7392f commit 37b0500
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
next
----
2.2.1
-----

* Add `Semigroup` instances
* GHC-8.4 compatibility
* `Schema (NonEmpty a) instance (see [#141](https://github.com/GetShopTV/swagger2/pull/141))
* Fix optional property for unary records (see [#142](https://github.com/GetShopTV/swagger2/issues/142))
* Add `fromAesonOptions` helper (see [#146](https://github.com/GetShopTV/swagger2/issues/139))
* Fix non-termination when using `datatypeNameModifier` with recursive data types (see [#132](https://github.com/GetShopTV/swagger2/issues/132))

2.2
---
Expand Down
1 change: 1 addition & 0 deletions src/Data/Swagger/Internal/Schema.hs
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ instance ToSchema a => ToSchema (Set a) where

instance ToSchema a => ToSchema (HashSet a) where declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy (Set a))

-- | @since 2.2.1
instance ToSchema a => ToSchema (NonEmpty a) where
declareNamedSchema _ = do
schema <- declareSchema (Proxy :: Proxy [a])
Expand Down
3 changes: 3 additions & 0 deletions src/Data/Swagger/SchemaOptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ defaultSchemaOptions = SchemaOptions
-- * 'Aeson.tagSingleConstructors'
--
-- The rest is defined as in 'defaultSchemaOptions'.
--
-- @since 2.2.1
--
fromAesonOptions :: Aeson.Options -> SchemaOptions
fromAesonOptions opts = defaultSchemaOptions
{ fieldLabelModifier = Aeson.fieldLabelModifier opts
Expand Down
2 changes: 1 addition & 1 deletion swagger2.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: swagger2
version: 2.2
version: 2.2.1
synopsis: Swagger 2.0 data model
description:
This library is inteded to be used for decoding and encoding Swagger 2.0 API
Expand Down

0 comments on commit 37b0500

Please sign in to comment.