11module OpenApi.Config exposing
22 ( Config , EffectType (..) , effectTypeToPackage, Format , Input , Path (..) , Server (..)
33 , init, inputFrom, pathFromString
4- , withAutoConvertSwagger, AutoConvertSwagger (..) , withEffectTypes, withFormat, withFormats, withGenerateTodos, withInput, withSwaggerConversionCommand, withSwaggerConversionUrl, withNoElmFormat
4+ , withAutoConvertSwagger, AutoConvertSwagger (..) , withEffectTypes, withFormat, withFormats, withGenerateTodos, withInput, withSwaggerConversionCommand, withSwaggerConversionUrl, withNoElmFormat, withKeepGoing
55 , withOutputModuleName, withOverrides, withServer, withWriteMergedTo, withWarnOnMissingEnums
6- , autoConvertSwagger, inputs, outputDirectory, swaggerConversionCommand, swaggerConversionUrl, noElmFormat
6+ , autoConvertSwagger, inputs, outputDirectory, swaggerConversionCommand, swaggerConversionUrl, noElmFormat, keepGoing
77 , oasPath, overrides, writeMergedTo
88 , toGenerationConfig, Generate , pathToString
99 , defaultFormats
@@ -20,13 +20,13 @@ module OpenApi.Config exposing
2020# Creation
2121
2222@docs init, inputFrom, pathFromString
23- @docs withAutoConvertSwagger, AutoConvertSwagger, withEffectTypes, withFormat, withFormats, withGenerateTodos, withInput, withSwaggerConversionCommand, withSwaggerConversionUrl, withNoElmFormat
23+ @docs withAutoConvertSwagger, AutoConvertSwagger, withEffectTypes, withFormat, withFormats, withGenerateTodos, withInput, withSwaggerConversionCommand, withSwaggerConversionUrl, withNoElmFormat, withKeepGoing
2424@docs withOutputModuleName, withOverrides, withServer, withWriteMergedTo, withWarnOnMissingEnums
2525
2626
2727# Config properties
2828
29- @docs autoConvertSwagger, inputs, outputDirectory, swaggerConversionCommand, swaggerConversionUrl, noElmFormat
29+ @docs autoConvertSwagger, inputs, outputDirectory, swaggerConversionCommand, swaggerConversionUrl, noElmFormat, keepGoing
3030
3131
3232# Input properties
@@ -83,6 +83,7 @@ type Config
8383 , staticFormats : List Format
8484 , dynamicFormats : List { format : String , basicType : Common . BasicType } -> List Format
8585 , noElmFormat : Bool
86+ , keepGoing : Bool
8687 }
8788
8889
@@ -242,6 +243,7 @@ init initialOutputDirectory =
242243 , staticFormats = defaultFormats
243244 , dynamicFormats = \ _ -> []
244245 , noElmFormat = False
246+ , keepGoing = False
245247 }
246248 |> Config
247249
@@ -550,6 +552,11 @@ withNoElmFormat newNoElmFormat (Config config) =
550552 Config { config | noElmFormat = newNoElmFormat }
551553
552554
555+ withKeepGoing : Bool -> Config -> Config
556+ withKeepGoing newKeepGoing ( Config config) =
557+ Config { config | keepGoing = newKeepGoing }
558+
559+
553560
554561-- -----------
555562-- Getters --
@@ -592,6 +599,12 @@ noElmFormat (Config config) =
592599 config. noElmFormat
593600
594601
602+ {- | -}
603+ keepGoing : Config -> Bool
604+ keepGoing ( Config config) =
605+ config. keepGoing
606+
607+
595608{- | -}
596609oasPath : Input -> Path
597610oasPath ( Input input) =
@@ -624,6 +637,7 @@ type alias Generate =
624637 , server : Server
625638 , formats : List Format
626639 , warnOnMissingEnums : Bool
640+ , keepGoing : Bool
627641 }
628642
629643
@@ -657,6 +671,7 @@ toGenerationConfig formatsInput (Config config) augmentedInputs =
657671 , server = input. server
658672 , warnOnMissingEnums = input. warnOnMissingEnums
659673 , formats = config. staticFormats ++ config. dynamicFormats formatsInput
674+ , keepGoing = config. keepGoing
660675 }
661676 , spec
662677 )
0 commit comments