@@ -2,7 +2,7 @@ module OpenApi.Config exposing
22 ( Config , EffectType (..) , effectTypeToPackage, Format , Input , Path (..) , Server (..)
33 , init, inputFrom, pathFromString
44 , withAutoConvertSwagger, withEffectTypes, withFormat, withFormats, withGenerateTodos, withInput, withSwaggerConversionCommand, withSwaggerConversionUrl
5- , withOutputModuleName, withOverrides, withServer, withWriteMergedTo
5+ , withOutputModuleName, withOverrides, withServer, withWriteMergedTo, withWarnOnMissingEnums
66 , autoConvertSwagger, inputs, outputDirectory, swaggerConversionCommand, swaggerConversionUrl
77 , oasPath, overrides, writeMergedTo
88 , toGenerationConfig, Generate , pathToString
@@ -21,7 +21,7 @@ module OpenApi.Config exposing
2121
2222@docs init, inputFrom, pathFromString
2323@docs withAutoConvertSwagger, withEffectTypes, withFormat, withFormats, withGenerateTodos, withInput, withSwaggerConversionCommand, withSwaggerConversionUrl
24- @docs withOutputModuleName, withOverrides, withServer, withWriteMergedTo
24+ @docs withOutputModuleName, withOverrides, withServer, withWriteMergedTo, withWarnOnMissingEnums
2525
2626
2727# Config properties
@@ -92,6 +92,7 @@ type Input
9292 , overrides : List Path
9393 , writeMergedTo : Maybe String
9494 , effectTypes : List EffectType
95+ , warnOnMissingEnums : Bool
9596 }
9697
9798
@@ -232,6 +233,7 @@ inputFrom path =
232233 , overrides = []
233234 , writeMergedTo = Nothing
234235 , effectTypes = [ ElmHttpCmd , ElmHttpTask ]
236+ , warnOnMissingEnums = False
235237 }
236238 |> Input
237239
@@ -472,6 +474,12 @@ withWriteMergedTo newWriteMergedTo (Input input) =
472474 Input { input | writeMergedTo = Just newWriteMergedTo }
473475
474476
477+ {- | -}
478+ withWarnOnMissingEnums : Bool -> Input -> Input
479+ withWarnOnMissingEnums newWarnOnMissingEnums ( Input input) =
480+ Input { input | warnOnMissingEnums = newWarnOnMissingEnums }
481+
482+
475483{- | -}
476484withFormat : Format -> Config -> Config
477485withFormat newFormat ( Config config) =
@@ -560,6 +568,7 @@ type alias Generate =
560568 , effectTypes : List EffectType
561569 , server : Server
562570 , formats : List Format
571+ , warnOnMissingEnums : Bool
563572 }
564573
565574
@@ -591,6 +600,7 @@ toGenerationConfig formatsInput (Config config) augmentedInputs =
591600 , generateTodos = config. generateTodos
592601 , effectTypes = input. effectTypes
593602 , server = input. server
603+ , warnOnMissingEnums = input. warnOnMissingEnums
594604 , formats = config. staticFormats ++ config. dynamicFormats formatsInput
595605 }
596606 , spec
0 commit comments