Changelog #026

Apr 26th, 2024 - FastAPI Integration

Follow us on twitter for realtime updates or read our previous changelog here

Community Contributors ✨

We wanted to give a shoutout to the open-source contributors who shipped some great work on the Open-Source repository:

Stoked to see this in production and bettering the Scalar API References ✨

FastAPI Integration

We couldn't be more excited to be releasing our Scalar FastAPI integration today 🥳.

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.

It's incredibly easy to get started, first install the python package

pip install scalar-fastapi

Then add a route to render your Scalar Docs

from typing import Union
from fastapi import FastAPI
from scalar_fastapi import get_scalar_api_reference

app = FastAPI()

@app.get("/")
def read_root():
    return {"Hello": "World"}

@app.get("/scalar", include_in_schema=False)
async def scalar_html():
    return get_scalar_api_reference(
        openapi_url=app.openapi_url,
        title=app.title + " - Scalar",
    )

That's it! Now you got beautiful Scalar API References for your FastAPI app 😮‍💨

Fixes & Improvements

So much work was put into smaller improvements + UX of our app, all the small details make the world of difference ✨

  • feat: configure whether to fetch the default fonts, fix #1471 (#1477)
  • chore: ignore generated files (#1531)
  • fix: typos (#1540)
  • feat: fastapi integration (#1534)
  • fix: truncate search results properly (#1530)
  • fix: summary markdown, fix #1524 (#1528)
  • fix: scalar icon type (#1529)
  • ci: add debug output to the release workflow
  • fix: example specification doesn’t pass validation (#1527)
  • feat: use Scalar Galaxy example everywhere (#1523)
  • refactor: remove @layer from base theme files (#1503)
  • chore: link to license in CDN version, closes #1482 (#1512)
  • build: update scalar components package icons (#1525)
  • chore: replace swagger.json examples with openapi.json, remove unused swagger.json (#1522)
  • chore: remove jsdelivr badge from CLI README
  • fix: handle circular references in code blocks, fix #1511 (#1514)
  • chore: remove date from townhall event (#1517)
  • docs: add the CLI to our root README (#1518)
  • ci: add comment to the dependabot config
  • chore: export tailwind config as ts (#1508)
  • chore: update readme for express (#1507)
  • refactor: move theme labels to @scalar/themes (#1501)
  • fix: allow nullable additional props (#1499)
  • feat: rebuild search modal (#1489)
  • chore: Make y-codemirror external and optional (#1494)
  • style: getting started tables (#1491)
  • feat(nuxt): add scalar tab to nuxt devtools (#1483)
  • fix: getting started themes (#1484)
  • fix: sidebar models collapse (#1485)
  • chore: add playwright snapshot tests for all themes and layouts (#1416)
  • feat: add better support for additional properties (#1424)
  • feat: use http as default scheme for Swagger 2.0 specifications, fix #1218 (#1475)
  • fix: hotfix integration fonts (#1466)
  • chore: upgrade storybook (#1469)
We are incredibly grateful for the Scalar community, all the feedback has been truly inspiring, helps guide us to prioritize fixes and we are looking forward to releasing more features and fixes for the next changelog ✨

Join us:

Marc

CEO & Co-Founder, Scalar