pass through manifest as raw json value

This commit is contained in:
Lucy Cifferello
2021-07-20 18:58:32 -04:00
committed by Keagan McClelland
parent d0504bc616
commit 9f4a344c04
2 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
!/package/#S9PK AppR GET -- get most recent appId at appversion spec, defaults to >=0.0.0 -- ?spec={semver-spec}
/data CategoriesR GET -- get all marketplace categories
/data CategoriesR GET -- get all marketplace categories
/packages PackageListR GET -- filter marketplace services by various query params
/eos EosR GET -- get eos information
/version/latest VersionLatestR GET -- get latest version of apps in query param id

View File

@@ -47,13 +47,13 @@ instance ToTypedContent CategoryRes where
toTypedContent = toTypedContent . toJSON
data ServiceRes = ServiceRes
{ serviceResIcon :: Text
, serviceResManifest :: ServiceManifest
, serviceResManifest :: Maybe Data.Aeson.Value -- ServiceManifest
, serviceResCategories :: [CategoryTitle]
, serviceResInstructions :: Text
, serviceResLicense :: Text
, serviceResVersions :: [Version]
, serviceResDependencyInfo :: HM.HashMap AppIdentifier DependencyInfo
} deriving (Show, Generic)
} deriving (Generic)
newtype ReleaseNotes = ReleaseNotes { unReleaseNotes :: HM.HashMap Version Text }
deriving (Eq, Show)
@@ -118,7 +118,7 @@ instance ToTypedContent ServiceAvailable where
toTypedContent = toTypedContent . toJSON
newtype ServiceAvailableRes = ServiceAvailableRes [ServiceRes]
deriving (Show, Generic)
deriving (Generic)
instance ToJSON ServiceAvailableRes
instance ToContent ServiceAvailableRes where
toContent = toContent . toJSON
@@ -310,7 +310,7 @@ getServiceDetails maybeVersion service = do
$logError "could not parse service manifest!"
$logError (show e)
sendResponseStatus status500 ("Internal Server Error" :: Text)
Right (a :: ServiceManifest) -> pure a
Right a -> pure a
d <- traverse (mapDependencyMetadata appsDir appMgrDir domain) (HM.toList $ serviceManifestDependencies manifest)
-- @TODO uncomment when sdk icon working
-- icon <- decodeIcon appMgrDir appDir appExt
@@ -319,7 +319,7 @@ getServiceDetails maybeVersion service = do
license <- decodeLicense appMgrDir appDir appExt
pure $ ServiceRes
{ serviceResIcon = icon
, serviceResManifest = manifest -- TypedContent "application/json" (toContent manifest)
, serviceResManifest = decode $ BS.fromStrict manifest' -- pass through raw JSON Value
, serviceResCategories = serviceCategoryCategoryName . entityVal <$> categories
, serviceResInstructions = instructions
, serviceResLicense = license