graphql-engine/server/src-test/Hasura/Backends/DataConnector/API/V0/SchemaSpec.hs
David Overton 6586053296 Gdw 85/capabilities endpoint
>

## Description ✍️

- Creates a new `/capabilities` endpoint for the GDC agent API
- Removes capabilities from the `/schema` endpoint
- Removes the `/config-schema` endpoint and includes the `ConfigSchemaResponse` within the `CapabilitiesResponse`

### Related Issues ✍
->

https://hasurahq.atlassian.net/browse/GDW-85

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4478
GitOrigin-RevId: 426662ee9e751343d94207d439a5025df65d2de7
2022-06-03 08:08:23 +00:00

25 lines
732 B
Haskell

{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE QuasiQuotes #-}
module Hasura.Backends.DataConnector.API.V0.SchemaSpec (spec) where
import Data.Aeson.QQ.Simple (aesonQQ)
import Hasura.Backends.DataConnector.API.V0.Schema
import Hasura.Backends.DataConnector.API.V0.TableSpec (genTableInfo)
import Hasura.Prelude
import Hedgehog
import Hedgehog.Gen qualified as Gen
import Hedgehog.Range
import Test.Aeson.Utils
import Test.Hspec
spec :: Spec
spec = do
describe "SchemaResponse" $ do
testToFromJSONToSchema (SchemaResponse []) [aesonQQ|{"tables": []}|]
jsonOpenApiProperties genSchemaResponse
genSchemaResponse :: MonadGen m => m SchemaResponse
genSchemaResponse =
SchemaResponse <$> Gen.list (linear 0 5) genTableInfo