You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --no-enum-sort flag to preserve spec-defined enum order
By default, enum variants are sorted alphabetically (existing behaviour).
Passing --no-enum-sort preserves the order defined in the OpenAPI spec,
which is useful when enum order is meaningful (e.g. status workflows).
Copy file name to clipboardExpand all lines: docs/USAGE.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,9 @@
25
25
-`[--effect-types <effect types>]`: A list of which kind of APIs to generate. Each item should be of the form `package.type`. If `package` is omitted it defaults to `elm/http`. If `type` is omitted it defaults to `cmd,task`. The options for package are: `elm/http`, `dillonkearns/elm-pages`, `lamdera/program-test`. The options for type are: `cmd`, `cmdrisky`, `cmdrecord`, `task`, `taskrisky`, `taskrecord`.
26
26
-`[--server <server>]`: The base URL for the OpenAPI server. If not specified this will be extracted from the OAS or default to root of the web application. You can pass in an object to define multiple servers, like `{"dev": "http://localhost", "prod": "https://example.com"}`. This will add a `server` parameter to functions and define a `Servers` module with your servers. You can pass in an empty object if you have fully dynamic servers.
27
27
-`[--no-elm-format]`: Don't run elm-format on the outputs.
28
+
-`[--no-enum-sort]`: Don't sort enum variants alphabetically, preserve the order from the spec.
28
29
-`[--keep-going]`: If a route can't be generated, skip it instead of erroring out.
30
+
29
31
## Example outputs:
30
32
31
33
Assume we have an OAS file named `my-cool-company-oas.json` and it has a field `"title": "My Coool Company"` and we run the CLI like so
0 commit comments