fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Support FusionAuth CLI with Restish

Open spwitt opened this issue 2 years ago • 0 comments

Support FusionAuth CLI with Restish

Problem

Restish is a CLI for interacting with REST APIs. It provides API configuration and profiles for different use cases along with streamlined data entry and tab-completion. Restish builds an API based on an OpenAPI or JSON Schema spec file.

The Restish tool does not currently work with the FusionAuth APIs. Any call made using the saved configuration results in a stack overflow error.

Solution

  1. Review the FusionAuth OpenAPI spec to ensure there are no errors
  2. Make the spec discoverable
  3. Link relation header at API base URI
  4. Make spec available at /api/openapi.yaml
  5. Resolve the stack overflow issue

The stack overflow issue seems most likely to be due to circular references in the API schema. This will likely require working with the Restish maintainer or making our own fix to the library.

Alternatives/workarounds

The Restish tool works with FusionAuth APIs, but it cannot use the saved configuration/schema. It still has some benefits like output filtering, enhanced data entry, and a more readable output.

Additional context

There was an update on the Restish repo in April 2022 to handle recursive schema references.

spwitt avatar Aug 29 '22 14:08 spwitt