Skip to content

Commit

Permalink
OpenAPI (#251): modules
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyYakeley committed Apr 19, 2024
1 parent 431a611 commit acbb52c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Pinafore/pinafore-webapi/lib/Pinafore/WebAPI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Pinafore.WebAPI
) where

import Pinafore.Language
import Pinafore.WebAPI.OpenAPI

webAPIImporters :: [Importer]
webAPIImporters = []
webAPIImporters = [openAPIImporter]
1 change: 1 addition & 0 deletions Pinafore/pinafore-webapi/lib/Pinafore/WebAPI/Fetch.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module Pinafore.WebAPI.Fetch where
13 changes: 13 additions & 0 deletions Pinafore/pinafore-webapi/lib/Pinafore/WebAPI/OpenAPI.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Pinafore.WebAPI.OpenAPI
( openAPIImporter
) where

import Pinafore.Language
import Pinafore.WebAPI.Fetch ()
import Shapes

importOpenAPI :: Text -> ResultT Text IO (LibraryContents ())
importOpenAPI _t = liftInner $ FailureResult "NYI"

openAPIImporter :: Importer
openAPIImporter = MkImporter "openapi" importOpenAPI
3 changes: 3 additions & 0 deletions Pinafore/pinafore-webapi/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ library:
- pinafore-language
exposed-modules:
- Pinafore.WebAPI
other-modules:
- Pinafore.WebAPI.Fetch
- Pinafore.WebAPI.OpenAPI
5 changes: 2 additions & 3 deletions Pinafore/pinafore-webapi/pinafore-webapi.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ library
exposed-modules:
Pinafore.WebAPI
other-modules:
Paths_pinafore_webapi
autogen-modules:
Paths_pinafore_webapi
Pinafore.WebAPI.Fetch
Pinafore.WebAPI.OpenAPI
hs-source-dirs:
lib
default-extensions:
Expand Down

0 comments on commit acbb52c

Please sign in to comment.