{"id":15091497,"url":"https://github.com/patoconnor43/heave","last_synced_at":"2025-04-12T07:11:40.283Z","repository":{"id":221407303,"uuid":"754293030","full_name":"PatOConnor43/heave","owner":"PatOConnor43","description":"A project that generates hurl files from OpenAPI","archived":false,"fork":false,"pushed_at":"2024-10-07T03:42:14.000Z","size":240,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T07:11:36.409Z","etag":null,"topics":["hurl","oas","openapi"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PatOConnor43.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-07T19:13:06.000Z","updated_at":"2024-11-18T01:54:23.000Z","dependencies_parsed_at":"2024-09-25T10:51:30.114Z","dependency_job_id":null,"html_url":"https://github.com/PatOConnor43/heave","commit_stats":{"total_commits":94,"total_committers":1,"mean_commits":94.0,"dds":0.0,"last_synced_commit":"374b54cf748b65cb1b4ad2c94af53e6434d50a16"},"previous_names":["patoconnor43/heave"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatOConnor43%2Fheave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatOConnor43%2Fheave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatOConnor43%2Fheave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatOConnor43%2Fheave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatOConnor43","download_url":"https://codeload.github.com/PatOConnor43/heave/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530576,"owners_count":21119600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hurl","oas","openapi"],"created_at":"2024-09-25T10:41:24.444Z","updated_at":"2025-04-12T07:11:40.246Z","avatar_url":"https://github.com/PatOConnor43.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# heave\nheave is a tool used to generate [hurl](https://github.com/Orange-OpenSource/hurl) files from OpenAPI specs.\n\nThese files can be used for testing or iterating on feature development.\n\n## Motivation\nI started on this tool because I was unhappy with the current solutions for\nsharing examples of requests. Plain text files are nice to read, easy to\nchange, and work well under version control. Hurl has an easy interface that\nlets you use these files to help you iterate on a feature or run them as tests\nand assert on the output.\n\n## Getting Started\nAssuming you have your spec and an output directory created, you use `heave` like this:\n```\nheave generate \u003cspec.yaml\u003e \u003coutput\u003e\n```\nThis will create one hurl file per operation per response. Meaning, if you had\nan OAS with a single `ListPets` operation that had an HTTP 200 response and an\n404 HTTP response defined, you would get 2 files.\n\nThese generated files should include:\n- The correct HTTP method (GET, POST, etc.)\n- A templated path, using hurl variables as path parameters\n- Header parameters (if defined)\n- Query parameters (if defined)\n- Request Body (if defined)\n- Asserts based on the response schema\n\nYou will most likely need to go through each file and customize some aspects of\nthe request, but I hope this tool handles a lot of the foundation for you.\n\n#### Customizing the template\nThis tool does allow you to also customize the template used to generate it.\nThis tool relies on the [minijinja](https://crates.io/crates/minijinja) crate\nfor templating. If you'd like to customize the template you can use `heave\ntemplate` to print the default template. Put that content into a file with your\nchanges. Then call `heave` again with your custom template:\n```\nheave generate \u003cspec.yaml\u003e \u003coutput\u003e --template \u003ctemplate\u003e\n```\nWith this functionality you could include additional headers or remove asserts\nentirely.\n\n## Contributing\n#### Testing\nThis project uses [cargo-insta](https://crates.io/crates/cargo-insta) to create\nsnapshots of the output to test against. Insta provides a tool that makes\nrunning these tests and reviewing their output easier. To install it run `cargo\ninstall cargo-insta`. Once this is installed, changes can be reviewed with\n`cargo insta test --review`.\n\nIf you're just trying to run the tests you can run `cargo test`.\n\n#### Releasing\nThis project uses [cargo-dist](https://opensource.axo.dev/cargo-dist/) and\n[cargo-release](https://github.com/crate-ci/cargo-release) for the release\nprocess.\n\nThe release process looks like this:\n- Checkout master\n- Create commit that updates RELEASES.md with notes for the new release and\n  push commit\n- Run `cargo release patch` (or minor or major) and verify the release looks\n  correct\n- Run the same command with `--execute`\n- The GitHub Action should start immediately for the tag\n\nIf you are updating cargo-dist you should also run `cargo dist init` to capture\nchanges to the action.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatoconnor43%2Fheave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatoconnor43%2Fheave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatoconnor43%2Fheave/lists"}