Skip to content

Comments

Adding new flag for routes task to output routes as JSON#2013

Merged
jwoertink merged 1 commit intomainfrom
issues/1852
Jan 22, 2026
Merged

Adding new flag for routes task to output routes as JSON#2013
jwoertink merged 1 commit intomainfrom
issues/1852

Conversation

@jwoertink
Copy link
Member

Purpose

Fixes #1852

Description

This adds a new optional output format to print the routes of your app as a JSON structure that looks like

lucky routes --with-params --format=json
[
  {
    "method": "GET",
    "path": "/",
    "action": "Home::Index",
    "params": []
  },
  {
    "method": "POST",
    "path": "/alerts",
    "action": "Alerts::Create",
    "params": [
      {
        "name": "title",
        "type": "String"
      }
     ]
  }
]

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

@jwoertink jwoertink merged commit a8d6f32 into main Jan 22, 2026
9 checks passed
@jwoertink jwoertink deleted the issues/1852 branch January 22, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add format flag to lucky routes for outputting alternate formats

1 participant