Skip to content

Hanami new --api mode #302

@cllns

Description

@cllns

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions