WIP: OpenAPI

This commit is contained in:
Correl Roush 2022-03-23 18:05:21 -04:00
parent 9bd190b609
commit 2310aa5c4f
3 changed files with 28 additions and 0 deletions

View file

@ -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

View file

@ -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
View 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>