[FEATURE] Add generatable 3x-UI schemas based on 3x-UI openapi.json #24

Closed
opened 2026-07-09 20:05:35 +00:00 by PoweredDeveloper · 0 comments

The Backend requires typed request and response models for interacting with the 3x-UI API. Maintaining these schemas manually is time-consuming and error-prone, especially as the 3x-UI API evolves.

Describe the solution you'd like

Introduce an automated schema generation workflow based on the 3x-UI OpenAPI specification (openapi.json).

The implementation should include:

  • Generate Python models from the 3x-UI OpenAPI specification.
  • Integrate schema generation into the development workflow.
  • Store generated models separately from handwritten code.
  • Make schema regeneration repeatable whenever the OpenAPI specification changes.
  • Document the generation process and required tooling.

Describe alternatives you've considered

The schemas could be implemented and maintained manually. However, this approach increases maintenance effort, risks diverging from the official API, and makes upgrading to newer 3x-UI versions more difficult.

Additional context

The generated schemas will be used by the Backend's 3x-UI adapter to provide strongly typed request and response models. The solution should make it straightforward to regenerate the models whenever a new version of the 3x-UI OpenAPI specification is adopted.

Checklist

  • I have checked that this feature is not already requested.
  • I am willing to help implement it (optional).
## Is your feature request related to a problem? The Backend requires typed request and response models for interacting with the 3x-UI API. Maintaining these schemas manually is time-consuming and error-prone, especially as the 3x-UI API evolves. ## Describe the solution you'd like Introduce an automated schema generation workflow based on the 3x-UI OpenAPI specification (`openapi.json`). The implementation should include: * Generate Python models from the 3x-UI OpenAPI specification. * Integrate schema generation into the development workflow. * Store generated models separately from handwritten code. * Make schema regeneration repeatable whenever the OpenAPI specification changes. * Document the generation process and required tooling. ## Describe alternatives you've considered The schemas could be implemented and maintained manually. However, this approach increases maintenance effort, risks diverging from the official API, and makes upgrading to newer 3x-UI versions more difficult. ## Additional context The generated schemas will be used by the Backend's 3x-UI adapter to provide strongly typed request and response models. The solution should make it straightforward to regenerate the models whenever a new version of the 3x-UI OpenAPI specification is adopted. ## Checklist * [x] I have checked that this feature is not already requested. * [x] I am willing to help implement it (optional).
PoweredDeveloper changed reference from main to backend-3xui-integration 2026-07-09 20:07:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PoweredDeveloper/radix-vpn#24
No description provided.