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

Safe HaskellNone
LanguageHaskell2010

OpenAPI.Generate.Model

Description

Defines functionality for the generation of models from OpenAPI schemas

Synopsis

Documentation

getSchemaType :: Flags -> SchemaObject -> Name Source #

Extracts the Name of a SchemaObject which should be used for primitive types

resolveSchemaReferenceWithoutWarning :: Schema -> Generator (Maybe SchemaObject) Source #

Transforms a Schema (either a reference or a concrete object) to Maybe SchemaObject If a reference is found it is resolved. If it is not found, no log message is generated.

getConstraintDescriptionsOfSchema :: Maybe SchemaObject -> [Text] Source #

Extracts the constraints of a SchemaObject as human readable text

defineModelForSchemaNamed :: Text -> Schema -> Generator TypeWithDeclaration Source #

Defines all the models for a schema and returns the declarations with the type of the root model

defineModelForSchema :: Text -> Schema -> Generator ModelWithDependencies Source #

Defines all the models for a schema

type TypeWithDeclaration = (Q Type, ModelContentWithDependencies) Source #

The type of a model and the declarations needed for defining it