Swagger UI / ReDoc Setup for Interactive API Documentation

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Swagger UI / ReDoc for Interactive API Documentation Setup

Swagger UI and ReDoc turn OpenAPI specification into readable documentation with examples and ability to test API right from browser. They are not alternatives—they solve different tasks and are often used together.

Swagger UI vs ReDoc

Swagger UI — interactive documentation with "Try it out" button. Developer enters parameters and sends real API request right from browser. Indispensable during development and integration debugging.

ReDoc — beautiful readable reference. Three-column layout: navigation, description, example. No "Try it out", but better readable on mobile and prints well. Suits public documentation.

Scalar — modern alternative to both: ReDoc beauty + Swagger UI interactivity. Supports OAS 3.1. Recommended for new projects.

Backend integration

Express.js:

import swaggerUi from 'swagger-ui-express';
import swaggerJsdoc from 'swagger-jsdoc';

const spec = swaggerJsdoc({
  definition: {
    openapi: '3.1.0',
    info: { title: 'My API', version: '1.0.0' },
  },
  apis: ['./routes/**/*.js'],
});

app.use('/docs', swaggerUi.serve, swaggerUi.setup(spec, {
  customCss: '.swagger-ui .topbar { display: none }',
  swaggerOptions: { persistAuthorization: true },
}));

FastAPI — Swagger UI available at /docs, ReDoc at /redoc automatically. For Scalar:

from scalar_fastapi import get_scalar_api_reference

@app.get("/scalar", include_in_schema=False)
async def scalar_html():
    return get_scalar_api_reference(openapi_url="/openapi.json", title="API Reference")

Laravel + Scramble — package automatically registers /docs/api route with Stoplight Elements interface.

Customization and authentication

For Bearer token authentication, configure persistAuthorization in Swagger UI—token persists across page reloads. In ReDoc, add x-logo and x-tagGroups in info section of OpenAPI spec to organize navigation by groups.

info:
  x-logo:
    url: 'https://example.com/logo.png'
  x-tagGroups:
    - name: Core
      tags: [users, projects]
    - name: Billing
      tags: [subscriptions, invoices]

Documentation hosting

Three options: embed in application (path /docs), deploy as separate static site, use hosted service (SwaggerHub, Readme.io).

Static option is most reliable. Export OpenAPI spec in CI, deploy Scalar/ReDoc as static to GitHub Pages or Cloudflare Pages.

Timeline

Connecting Swagger UI or ReDoc to existing application — 0.5–1 day. Custom styling and authentication setup — 1 day. Migration to Scalar with custom domain setup — 1–2 days.