hanami / hanami/hanami-cli

Hanami new --api mode

Open
#302 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
33
Forks
55
Avg merge
8d 7h
Merged PRs (30d)
2

Description

It'd be great if we could support JSON API's from `hanami new` without the user needing to do any additional configuration.

It'd include --skip-assets, and I think it should also --skip-view (which doesn't exist yet: #301). Beyond that, we should configure actions to accept and return JSON only, and remove all Capybara/feature specs files. We may also want to replace spec/support/db/features.rb with spec/support/db/requests.rb, as request specs are analogous to feature specs for API apps.

I think the CLI flag should be `--api [json]`, to provide an extension point for people who want to generate other kinds of API's but provide `json` as the default since that'll be the majority of uses.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.