marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
5.39k stars 158 forks source link

chore: add openapi spec generation and codegen typescript #1594

Closed mscolnick closed 3 weeks ago

mscolnick commented 3 weeks ago

This generates an openapi/api.yml schema from our endpoints. It doesn't require any new dependencies in production. We generate the API during development and not on-the-fly or in CI. While we do commit generated code, it is easier to review and doesn't complicate the build system.


Couple new commands:

Printing the OpenAPI schema

marimo development openapi

Writing a new OpenAPI schema

marimo development openapi > openapi/api.yaml

Validating an OpenAPI schema

pipx install openapi-spec-validator
marimo development openapi | openapi-spec-validator -

Generating a client from an OpenAPI schema

make fe-codegen
vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 5:49pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 5:49pm
github-actions[bot] commented 3 weeks ago

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.6.18-dev8