Swagger UI
The Swagger UI is available at: https://api-v2.rubic.exchange/api/swagger/ It always reflects the current state of the API and is generated directly from the OpenAPI specification.OpenAPI specification
Rubic API is described using OpenAPI 3.x. The specification defines:- available endpoints and HTTP methods
- request parameters and request bodies
- response schemas
- error response formats
Raw OpenAPI files
In addition to Swagger UI, Rubic provides direct access to the raw OpenAPI specification files. These files can be used for:- generating API clients
- importing into tools like Postman or Insomnia
- validating requests and responses
- offline inspection of the API schema
- JSON: https://api-v2.rubic.exchange/api/routes/swagger-json
- YAML: https://api-v2.rubic.exchange/api/routes/swagger-yaml
What Swagger is useful for
Swagger is best suited for:- discovering available endpoints
- understanding request and response structures
- checking required and optional fields
- testing API calls in an isolated environment
Using Swagger for testing
You can execute requests directly from Swagger UI. Typical flow:- Open the Swagger UI
- Select an endpoint
- Click Try it out
- Fill in the required parameters
- Execute the request
- Inspect the response
Versioning and updates
The Swagger UI and OpenAPI files always represent the latest version of the API. As the API evolves:- new fields or endpoints may be added
- existing fields may become deprecated