Skip to content

Allow Customizable API Route Prefix for Improved Integration Flexibility #9

@genedna

Description

@genedna

Currently, ZTM's API routes are defined directly from the root path (e.g., /api/status, /api/endpoints). This works well when ZTM is used as a standalone application. However, it can lead to route conflicts when integrating ZTM into other applications that might have their API endpoints.

Could you introduce a configuration option to set a custom prefix for all ZTM API routes? This prefix would be prepended to all existing routes.

Example:

If the prefix is set to /ztm, the routes would become:

/ztm/api/status
/ztm/api/endpoints
...
  1. Seamless Integration: ZTM can be easily embedded into other applications without risking route collisions.
  2. Customization: Users can choose a prefix that aligns with their existing application's structure.
  3. Flexibility: This change would not break existing setups where ZTM is used standalone (the prefix could default to an empty string).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions