@@ -863,6 +863,129 @@ singleMaybeFieldSchemaJSON = [aesonQQ|
866+-- ========================================================================
867+-- Natural Language (single field data with recursive fields)
868+-- ========================================================================
871+ = PredicateNoun Noun
872+ | PredicateOmitted Omitted
873+ deriving (Eq, Ord, Read, Show, Generic)
874+instance ToJSON Predicate
875+instance ToSchema Predicate
879+ { nounSurf :: LangWord
880+ , nounModify :: [Modifier]
882+ deriving (Eq, Ord, Read, Show, Generic)
884+instance ToSchema Noun
888+ { langWordSurf :: String
889+ , langWordBase :: String
891+ deriving (Eq, Ord, Read, Show, Generic)
892+instance ToJSON LangWord
893+instance ToSchema LangWord
897+ | ModifierOmitted Omitted
898+ deriving (Eq, Ord, Read, Show, Generic)
899+instance ToJSON Modifier
900+instance ToSchema Modifier
904+ { omittedModify :: [Modifier]
906+ deriving (Eq, Ord, Read, Show, Generic)
907+instance ToJSON Omitted
908+instance ToSchema Omitted
910+predicateSchemaDeclareJSON :: Value
911+predicateSchemaDeclareJSON = [aesonQQ|
918+ "contents": { "$ref": "#/components/schemas/Noun" },
919+ "tag": { "enum": ["PredicateNoun"], "type": "string" }
921+ "required": ["tag", "contents"],
926+ "contents": { "$ref": "#/components/schemas/Omitted" },
927+ "tag": { "enum": ["PredicateOmitted"], "type": "string" }
929+ "required": ["tag", "contents"],
938+ "items": { "$ref": "#/components/schemas/Modifier" },
941+ "nounSurf": { "$ref": "#/components/schemas/LangWord" }
943+ "required": ["nounSurf", "nounModify"],
948+ "langWordBase": { "type": "string" },
949+ "langWordSurf": { "type": "string" }
951+ "required": ["langWordSurf", "langWordBase"],
958+ "contents": { "$ref": "#/components/schemas/Noun" },
959+ "tag": { "enum": ["ModifierNoun"], "type": "string" }
961+ "required": ["tag", "contents"],
966+ "contents": { "$ref": "#/components/schemas/Omitted" },
967+ "tag": { "enum": ["ModifierOmitted"], "type": "string" }
969+ "required": ["tag", "contents"],
978+ "items": { "$ref": "#/components/schemas/Modifier" },
982+ "required": ["omittedModify"],
986+ { "$ref": "#/components/schemas/Predicate" }
867-- ========================================================================
990-- ========================================================================
868-- TimeOfDay
991-- TimeOfDay