Instead of manually creating requests one by one, Xolo can generate a complete, ready-to-use collection directly from an OpenAPI specification. Every path–method pair in the spec becomes a saved request with its URL, query parameters, headers, and a pre-populated request body generated from the schema — letting you go from spec to first API call in seconds.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JonathanHerSa/xolo-api-hub/llms.txt
Use this file to discover all available pages before exploring further.
Supported Formats
Xolo’sOpenApiService accepts OpenAPI v3 JSON (the openapi key) and Swagger 2.0 JSON (the swagger key). The spec must be a valid JSON object containing:
info.title— becomes the root collection name (falls back to"Imported Collection"if absent)paths— the map of endpoint definitions
ImportManager.detectFormat() identifies an OpenAPI file automatically by looking for an openapi or swagger top-level key, so the format picker can stay on Auto-detect.
Import from URL
Open the Import dialog
Tap the sidebar menu → Import → Collection. The
ImportCollectionDialog opens. Ensure the source toggle is set to URL and the format is set to Auto-detect or OpenAPI.Enter the spec URL
Type or paste the full URL of the OpenAPI JSON spec, for example:Xolo uses
Dio to fetch the spec over HTTP/HTTPS.Xolo fetches and parses the spec
OpenApiService.importFromUrl() issues a GET request to the URL, validates that the response is a Map<String, dynamic>, then calls importFromJson() internally to build the collection tree.Import from File
Select the spec file
Tap Select file. The file picker opens filtered to
.json, .yaml, and .yml extensions. Select your local OpenAPI JSON file.Generated Request Structure
OpenApiService._parseAndSave() iterates over every paths entry and every HTTP method within it. The logic skips the pseudo-keys parameters, summary, and description so only real method entries produce requests.
| Request field | Source in spec | Notes |
|---|---|---|
| Name | operation.summary → operation.operationId → "{METHOD} {path}" | First non-null wins |
| Method | Path method key (e.g. get, post) | Upper-cased |
| URL | servers[0].url + path | Swagger 2.0: {scheme}://{host}{basePath} |
| Path params | {param} syntax in path | Replaced with {{param}} Xolo variable syntax |
| Query params | parameters[].in == "query" | Imported as empty active key-value pairs |
| Headers | parameters[].in == "header" | Imported as empty active key-value pairs |
| Body | requestBody.content["application/json"].schema | Sample generated by SchemaHelper |
| Sub-collection | operation.tags[0] | First tag becomes the folder name |
Tag-based grouping
Endpoints that share the same first tag are placed in the same sub-collection folder. Xolo upserts tag folders — if a folder with the same name already exists under the root collection, it is reused rather than duplicated.OpenApiService Reference
importFromUrl
importFromJson
_parseAndSave() pipeline. importFromUrl adds an HTTP GET fetch step before calling importFromJson.
SchemaHelper — Pre-populated Request Bodies
The import pipeline usesSchemaHelper to turn schema objects into concrete sample payloads. Before writing the request, OpenApiService calls:
SchemaHelper.resolveSchema(schema, rootSpec)— walks$refpointers within the spec JSON to return a self-contained schema object.SchemaHelper.generateSample(resolvedSchema)— produces a sample value following this priority:examplefield →defaultfield →nullablenull →enumfirst value → recursive object/array generation fromproperties/items. The sample is pretty-printed with a 2-space indent and stored as the request body.
parameters[].in == "body" entry rather than a requestBody block.
Authentication schemes defined in the OpenAPI spec’s
securitySchemes or security blocks are not automatically imported. Configure authentication manually on the collection or individual requests using Xolo’s Auth tab after the import completes.