File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 "automatically created by" : " elm-review suppress" ,
44 "learn more" : " elm-review suppress --help" ,
55 "suppressions" : [
6- { "count" : 30 , "filePath" : " src/OpenApi/Config.elm" },
6+ { "count" : 29 , "filePath" : " src/OpenApi/Config.elm" },
77 { "count" : 5 , "filePath" : " src/OpenApi/Generate.elm" }
88 ]
99}
Original file line number Diff line number Diff line change @@ -209,7 +209,8 @@ type Path
209209 | Url Url . Url -- https://petstore3.swagger.io/api/v3/openapi.json
210210
211211
212- {- | -}
212+ {- | Builds a `Path`. If the file is a valid URL, it will be used as such, otherwise it will be interpreted as a local file path.
213+ -}
213214pathFromString : String -> Path
214215pathFromString path =
215216 case Url . fromString path of
@@ -231,7 +232,15 @@ pathToString pathType =
231232 Url . toString url
232233
233234
234- {- | -}
235+ {- | Create an empty `Config` with no inputs and a given output directory.
236+
237+ The default options are to:
238+
239+ - run elm-format;
240+ - ask before converting Swagger specs to OpenAPI specs;
241+ - fail rather than generating `Debug.todo` or skipping unimplemented paths.
242+
243+ -}
235244init : String -> Config
236245init initialOutputDirectory =
237246 { inputs = []
@@ -268,7 +277,16 @@ inputFrom path =
268277-- -----------
269278
270279
271- {- | -}
280+ {- | The built-in formats:
281+
282+ - `date-time`
283+ - `date`
284+ - `uri`
285+ - `uuid`
286+ - `byte`
287+ - `password`
288+
289+ -}
272290defaultFormats : List Format
273291defaultFormats =
274292 [ dateTimeFormat
You can’t perform that action at this time.
0 commit comments