Skip to content

Commit 6848100

Browse files
committed
Keep adding documentation
1 parent b4f6274 commit 6848100

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

review/suppressed/Docs.NoMissing.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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
}

src/OpenApi/Config.elm

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff 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+
-}
213214
pathFromString : String -> Path
214215
pathFromString 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+
-}
235244
init : String -> Config
236245
init 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+
-}
272290
defaultFormats : List Format
273291
defaultFormats =
274292
[ dateTimeFormat

0 commit comments

Comments
 (0)