Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
updated the golden files for haskell to be able to generate against t…
…hose
  • Loading branch information
Fjolnir-Dvorak committed Oct 4, 2019
commit 2b9c725d0bbc0e702c97161a39f449263b0d0de1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.3-SNAPSHOT
4.2.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ type OpenAPIPetstoreAPI
= "pet" :> ReqBody '[JSON] Pet :> Verb 'POST 200 '[JSON] () -- 'addPet' route
:<|> "pet" :> Capture "petId" Integer :> Header "api_key" Text :> Verb 'DELETE 200 '[JSON] () -- 'deletePet' route
:<|> "pet" :> "findByStatus" :> QueryParam "status" (QueryList 'CommaSeparated (Text)) :> Verb 'GET 200 '[JSON] [Pet] -- 'findPetsByStatus' route
:<|> "pet" :> "findByTags" :> QueryParam "tags" (QueryList 'CommaSeparated (Text)) :> QueryParam "maxCount" Int :> Verb 'GET 200 '[JSON] [Pet] -- 'findPetsByTags' route
:<|> "pet" :> "findByTags" :> QueryParam "tags" (QueryList 'CommaSeparated (Text)) :> Verb 'GET 200 '[JSON] [Pet] -- 'findPetsByTags' route
:<|> "pet" :> Capture "petId" Integer :> Verb 'GET 200 '[JSON] Pet -- 'getPetById' route
:<|> "pet" :> ReqBody '[JSON] Pet :> Verb 'PUT 200 '[JSON] () -- 'updatePet' route
:<|> "pet" :> Capture "petId" Integer :> ReqBody '[FormUrlEncoded] FormUpdatePetWithForm :> Verb 'POST 200 '[JSON] () -- 'updatePetWithForm' route
Expand Down Expand Up @@ -176,7 +176,7 @@ data OpenAPIPetstoreBackend m = OpenAPIPetstoreBackend
{ addPet :: Pet -> m (){- ^ -}
, deletePet :: Integer -> Maybe Text -> m (){- ^ -}
, findPetsByStatus :: Maybe [Text] -> m [Pet]{- ^ Multiple status values can be provided with comma separated strings -}
, findPetsByTags :: Maybe [Text] -> Maybe Int -> m [Pet]{- ^ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -}
, findPetsByTags :: Maybe [Text] -> m [Pet]{- ^ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -}
, getPetById :: Integer -> m Pet{- ^ Returns a single pet -}
, updatePet :: Pet -> m (){- ^ -}
, updatePetWithForm :: Integer -> FormUpdatePetWithForm -> m (){- ^ -}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
module OpenAPIPetstore.Types (
ApiResponse (..),
Category (..),
InlineObject (..),
InlineObject1 (..),
Order (..),
Pet (..),
Tag (..),
Expand Down Expand Up @@ -65,38 +63,6 @@ instance ToSchema Category where
$ removeFieldLabelPrefix False "category"


-- |
data InlineObject = InlineObject
{ inlineObjectName :: Maybe Text -- ^ Updated name of the pet
, inlineObjectStatus :: Maybe Text -- ^ Updated status of the pet
} deriving (Show, Eq, Generic, Data)

instance FromJSON InlineObject where
parseJSON = genericParseJSON (removeFieldLabelPrefix True "inlineObject")
instance ToJSON InlineObject where
toJSON = genericToJSON (removeFieldLabelPrefix False "inlineObject")
instance ToSchema InlineObject where
declareNamedSchema = Swagger.genericDeclareNamedSchema
$ Swagger.fromAesonOptions
$ removeFieldLabelPrefix False "inlineObject"


-- |
data InlineObject1 = InlineObject1
{ inlineObject1AdditionalMetadata :: Maybe Text -- ^ Additional data to pass to server
, inlineObject1File :: Maybe FilePath -- ^ file to upload
} deriving (Show, Eq, Generic, Data)

instance FromJSON InlineObject1 where
parseJSON = genericParseJSON (removeFieldLabelPrefix True "inlineObject1")
instance ToJSON InlineObject1 where
toJSON = genericToJSON (removeFieldLabelPrefix False "inlineObject1")
instance ToSchema InlineObject1 where
declareNamedSchema = Swagger.genericDeclareNamedSchema
$ Swagger.fromAesonOptions
$ removeFieldLabelPrefix False "inlineObject1"


-- | An order for a pets from the pet store
data Order = Order
{ orderId :: Maybe Integer -- ^
Expand Down