-
-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1475 from akhesaCaro/aeson_2
support Aeson 2
- Loading branch information
Showing
35 changed files
with
2,382 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
1.1.9 | ||
------- | ||
|
||
* Support `servant-0.18` | ||
|
||
1.1.8 | ||
------- | ||
|
||
* Support `servant-0.17` | ||
|
||
1.1.7.1 | ||
------- | ||
|
||
* Support `swagger2-2.4` | ||
|
||
1.1.7 | ||
----- | ||
|
||
* Support servant-0.15 | ||
- support for 'Stream' and 'StreamBody' combinators | ||
- orphan 'ToSchema (SourceT m a)' instance | ||
* Fix BodyTypes to work with generalized ReqBody' | ||
[#88](https://github.com/haskell-servant/servant-swagger/pull/88) | ||
|
||
1.1.6 | ||
----- | ||
|
||
* Fixes: | ||
* `validateEveryToJSON` now prints validation errors | ||
|
||
* Notes: | ||
* GHC-8.6 compatible release | ||
|
||
1.1.5 | ||
----- | ||
|
||
* Notes: | ||
* `servant-0.13` compatible release | ||
* Drops compatibility with previous `servant` versions. | ||
|
||
1.1.4 | ||
----- | ||
|
||
* Notes: | ||
* `servant-0.12` compatible release | ||
|
||
1.1.3.1 | ||
--- | ||
|
||
* Notes: | ||
* GHC-8.2 compatible release | ||
|
||
1.1.3 | ||
--- | ||
|
||
* Notes: | ||
* `servant-0.11` compatible release | ||
|
||
1.1.2.1 | ||
--- | ||
|
||
* Notes: | ||
* `servant-0.10` compatible release | ||
|
||
1.1.2 | ||
--- | ||
|
||
* Minor fixes: | ||
* Support for aeson-1, insert-ordered-containers-0.2 | ||
* CaptureAll instance | ||
|
||
1.1.1 | ||
--- | ||
|
||
* Minor fixes: | ||
* Fix `unused-imports` and `unused-foralls` warnings; | ||
* Fix tests to match `swagger2-2.1.1` (add `example` property for `UTCTime` schema). | ||
|
||
1.1 | ||
--- | ||
|
||
* Breaking changes: | ||
* Requires `swagger2 >= 2.1` | ||
* Requires `servant >= 0.5` | ||
|
||
* Notes: | ||
* GHC-8.0 compatible release | ||
|
||
1.0.3 | ||
--- | ||
|
||
* Fixes: | ||
* Improve compile-time performance of `BodyTypes` even further (see [18e0d95](https://github.com/haskell-servant/servant-swagger/commit/18e0d95ef6fe9076dd9621cb515d8d1a189f71d3))! | ||
|
||
1.0.2 | ||
--- | ||
|
||
* Minor changes: | ||
* Add GHC 7.8 support (see [#26](https://github.com/haskell-servant/servant-swagger/pull/26)). | ||
|
||
* Fixes: | ||
* Improve compile-time performance of `BodyTypes` (see [#25](https://github.com/haskell-servant/servant-swagger/issues/25)). | ||
|
||
1.0.1 | ||
--- | ||
|
||
* Fixes: | ||
* Stop using `Data.Swagger.Internal`; | ||
* Documentation fixes (links to examples). | ||
|
||
1.0 | ||
--- | ||
|
||
* Major changes (see [#24](https://github.com/haskell-servant/servant-swagger/pull/24)): | ||
* Switch to `swagger2-2.*`; | ||
* Add automatic `ToJSON`/`ToSchema` validation tests; | ||
* Add great documentation; | ||
* Export some type-level functions for servant API. | ||
|
||
* Minor changes: | ||
* Rework Todo API example; | ||
* Stop exporting `ToResponseHeader`, `AllAccept` and `AllToResponseHeader` (see [bd50db4](https://github.com/haskell-servant/servant-swagger/commit/bd50db48ca6a106e4366560ded70932d409de1e2)); | ||
* Change maintainer, update authors/copyrights (see [1a62681](https://github.com/haskell-servant/servant-swagger/commit/1a6268101dc826a92c42e832e402e251c0d32147)); | ||
* Include changelog and example files into `extra-source-files`. | ||
|
||
0.1.2 | ||
--- | ||
|
||
* Fixes: | ||
* Fix default spec for `ReqBody` param to be required (see [#22](https://github.com/haskell-servant/servant-swagger/issues/22)); | ||
* Set version bounds for `swagger2`. | ||
|
||
0.1.1 | ||
--- | ||
|
||
* Fixes: | ||
* Fix `subOperations` to filter endpoints also by method (see [#18](https://github.com/haskell-servant/servant-swagger/issues/18)); | ||
* Fix response schema in `ToSwagger` instance for `Header` (see [b59e557](https://github.com/haskell-servant/servant-swagger/commit/b59e557a05bc2669332c52b397879e7598747b82)). | ||
|
||
0.1 | ||
--- | ||
* Major changes | ||
* Use `swagger2` for data model (see [#9](https://github.com/dmjio/servant-swagger/pull/9)); this changes almost everything. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Copyright (c) 2015-2016, Servant contributors | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of servant-swagger nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# servant-swagger | ||
|
||
[![Hackage](https://img.shields.io/hackage/v/servant-swagger.svg)](http://hackage.haskell.org/package/servant-swagger) | ||
[![Stackage LTS](http://stackage.org/package/servant-swagger/badge/lts)](http://stackage.org/lts/package/servant-swagger) | ||
[![Stackage Nightly](http://stackage.org/package/servant-swagger/badge/nightly)](http://stackage.org/nightly/package/servant-swagger) | ||
|
||
Swagger 2.0 conforming json for [servant](https://github.com/haskell-servant/servant) APIs. | ||
|
||
![servant-swagger robot](http://s16.postimg.org/rndz1wbyt/servant.png) | ||
|
||
### Motivation | ||
|
||
Swagger is a project used to describe and document RESTful APIs. | ||
Unlike Servant it is language-agnostic and thus is quite popular among developers | ||
in different languages. It also exists for a longer time and has more tools to work with. | ||
|
||
This package provides means to generate Swagger specification for a Servant API | ||
and also to partially test whether API conforms with its specification. | ||
|
||
Generated Swagger specification then can be used for many things such as | ||
- displaying interactive documentation using [Swagger UI](http://swagger.io/swagger-ui/); | ||
- generating clients and servers in many languages using [Swagger Codegen](http://swagger.io/swagger-codegen/); | ||
- and [many others](http://swagger.io/open-source-integrations/). | ||
|
||
### Usage | ||
|
||
Please refer to [haddock documentation](http://hackage.haskell.org/package/servant/servant-swagger). | ||
|
||
Some examples can be found in [`example/` directory](/example). | ||
|
||
### Try it out | ||
|
||
All generated swagger specifications can be interactively viewed on [Swagger Editor](http://editor.swagger.io/). | ||
|
||
Ready-to-use specification can be served as JSON and interactive API documentation | ||
can be displayed using [Swagger UI](https://github.com/swagger-api/swagger-ui). | ||
|
||
Many Swagger tools, including server and client code generation for many languages, can be found on | ||
[Swagger's Tools and Integrations page](http://swagger.io/open-source-integrations/). | ||
|
||
### Contributing | ||
|
||
We are happy to receive bug reports, fixes, documentation enhancements, and other improvements. | ||
|
||
Please report bugs via the [github issue tracker](https://github.com/haskell-servant/servant/issues). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{-# LANGUAGE CPP #-} | ||
{-# OPTIONS_GHC -Wall #-} | ||
module Main (main) where | ||
|
||
#ifndef MIN_VERSION_cabal_doctest | ||
#define MIN_VERSION_cabal_doctest(x,y,z) 0 | ||
#endif | ||
|
||
#if MIN_VERSION_cabal_doctest(1,0,0) | ||
|
||
import Distribution.Extra.Doctest ( defaultMainWithDoctests ) | ||
main :: IO () | ||
main = defaultMainWithDoctests "doctests" | ||
|
||
#else | ||
|
||
#ifdef MIN_VERSION_Cabal | ||
-- If the macro is defined, we have new cabal-install, | ||
-- but for some reason we don't have cabal-doctest in package-db | ||
-- | ||
-- Probably we are running cabal sdist, when otherwise using new-build | ||
-- workflow | ||
#warning You are configuring this package without cabal-doctest installed. \ | ||
The doctests test-suite will not work as a result. \ | ||
To fix this, install cabal-doctest before configuring. | ||
#endif | ||
|
||
import Distribution.Simple | ||
|
||
main :: IO () | ||
main = defaultMain | ||
|
||
#endif |
Oops, something went wrong.