Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
The general flow of the app is:

1. parse args & read in the spec using `elm-pages`
1. generate the Elm code with `elm-codegen`
1. write it to disk using `elm-pages`.
2. generate the Elm code with `elm-codegen`
3. write it to disk using `elm-pages`.

## Getting Started

Make sure you have Nix installed (with flakes enabled) so you can use the
project's development shell. An easy way to satisfy this requirement is the
[Determinate Nix Installer][determinate-nix]).

- Clone this repo
- Inside your cloned repo, run `direnv allow`
- Inside your cloned repo, run `direnv allow` to automatically enter the development shell,
- if you don't use direnv, run `nix develop` to manually enter a development shell
- Start coding!
- Run `npm run dev <path to oas spec>`
- e.g. `npm run dev ./example/github-spec.json` will produce: `generated/GithubV3RestApi/APi.elm`, `generated/GithubV3RestApi/Json.elm`, `generated/GithubV3RestApi/Types.elm`, and `generated/OpenApi/Common.elm`
- e.g. `npm run dev ./example/github-spec.json` will produce: `generated/GithubV3RestApi/Api.elm`, `generated/GithubV3RestApi/Json.elm`, `generated/GithubV3RestApi/Types.elm`, and `generated/OpenApi/Common.elm`
- Please run `npm run test:gen` when making a pull request to ensure that the generated code is correct. _(would be nice to have this as part of the CI checks in the future)_

[determinate-nix]: https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#determinate-nix-installer

## Project structure

```
Expand Down