Add OpenAPI documentation
This commit is contained in:
parent
9bd190b609
commit
d3a8fbea7d
3 changed files with 28 additions and 0 deletions
|
@ -21,6 +21,7 @@ description: Please see the README on GitHub at <https://github.com/gith
|
|||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- aeson
|
||||
- servant-openapi3
|
||||
- servant-server
|
||||
- text
|
||||
- uuid
|
||||
|
|
|
@ -31,6 +31,7 @@ library
|
|||
build-depends:
|
||||
aeson
|
||||
, base >=4.7 && <5
|
||||
, servant-openapi3
|
||||
, servant-server
|
||||
, text
|
||||
, uuid
|
||||
|
@ -49,6 +50,7 @@ executable tutor-exe
|
|||
build-depends:
|
||||
aeson
|
||||
, base
|
||||
, servant-openapi3
|
||||
, servant-server
|
||||
, text
|
||||
, tutor
|
||||
|
@ -72,6 +74,7 @@ test-suite tutor-test
|
|||
, hspec
|
||||
, hspec-wai
|
||||
, hspec-wai-json
|
||||
, servant-openapi3
|
||||
, servant-server
|
||||
, text
|
||||
, tutor
|
||||
|
|
24
www/public/api/index.html
Normal file
24
www/public/api/index.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Redoc</title>
|
||||
<!-- needed for adaptive design -->
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
||||
|
||||
<!--
|
||||
Redoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'></redoc>
|
||||
<script src="https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js"> </script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue