openapi3-code-generator-0.1.0.6: OpenAPI3 Haskell Client Code Generator

Safe HaskellNone
LanguageHaskell2010

OpenAPI.Generate.ModelDependencies

Description

Functionality to split models into multiple modules according to their dependencies

Synopsis

Documentation

getModelModulesFromModelsWithDependencies :: String -> [ModelWithDependencies] -> Q [ModuleDefinition] Source #

Analyzes the dependencies of the provided models and splits them into modules. All models with cyclic dependencies (between each other or to itself) are put in a module named by cyclicTypesModule.

type ModuleDefinition = ([String], Doc) Source #

A module definition with a name as a string list with the different module levels (e. g. ["OpenAPI", "Generate"] for OpenAPI.Generate) and the Doc representing the module content

type Models = Set Text Source #

A set of model names (typically used as dependency list)

type ModelContentWithDependencies = (Q Doc, Models) Source #

A tuple containing the content and the dependencies of a model

type ModelWithDependencies = (Text, ModelContentWithDependencies) Source #

Represents a model with a name, content and dependencies