Automate docs/openapi.json by sscargal · Pull Request #1190 · MemMachine/MemMachine

Purpose of the change

This change adds metadata tags (categories) to the FastAPI server endpoints. These tags are used to auto generate the openapi.json that is required for the public documentation on docs.memmachine.ai. This PR also includes automation to pull the latest MemMachine Platform API (openapi.json) and store it as docs/platform.openapi.json that is also displayed in the public docs.

Description

As stated above. This solves the problem of humans needing to manually generate the openapi.json each time the APIs are modified, or at release time.

It's critical to organize the API endpoints for developer friendly organization and findability.

Fixes/Closes

Fixes #317

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Manual verification (list step-by-step instructions)

Test Results: [Attach logs, screenshots, or relevant output]

The scripts have been tested and the resulting openapi.json and platform.openapi.json tested and validated in an offline Mintlify dev environment.

Checklist

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • I have commented my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

Screenshots/Gifs

N/A

Further comments

N/A