syncstorage-rs/syncserver/examples/generate_openapi_spec.rs
Taddes 62bd7d2c6a
Some checks failed
Glean probe-scraper / glean-probe-scraper (push) Has been cancelled
Build, Tag and Push Container Images to GAR Repository / build-and-push-syncstorage-rs (push) Has been cancelled
Build, Tag and Push Container Images to GAR Repository / build-and-push-syncstorage-rs-postgres (push) Has been cancelled
Build, Tag and Push Container Images to GAR Repository / build-and-push-syncstorage-rs-spanner-python-utils (push) Has been cancelled
Build, Tag and Push Container Images to GAR Repository / build-and-push-syncstorage-rs-postgres-python-utils (push) Has been cancelled
Build, Tag and Push Container Images to GAR Repository / build-and-push-syncstorage-rs-mysql (push) Has been cancelled
MySQL Build and Test / build-and-test-mysql (push) Has been cancelled
Postgres Build and Test / build-and-test-postgres (push) Has been cancelled
Publish Sync docs to pages / build-mdbook (push) Has been cancelled
Publish Sync docs to pages / build-openapi (push) Has been cancelled
Spanner Build, Test, and Push / build-and-test-spanner (push) Has been cancelled
MySQL Build and Test / build-mysql-image (push) Has been cancelled
MySQL Build and Test / mysql-e2e-tests (push) Has been cancelled
MySQL Build and Test / deploy-mysql-dockerhub (push) Has been cancelled
Postgres Build and Test / build-postgres-image (push) Has been cancelled
Postgres Build and Test / postgres-e2e-tests (push) Has been cancelled
Postgres Build and Test / deploy-postgres-dockerhub (push) Has been cancelled
Publish Sync docs to pages / combine-and-prepare (push) Has been cancelled
Publish Sync docs to pages / deploy (push) Has been cancelled
Spanner Build, Test, and Push / build-spanner-image (push) Has been cancelled
Spanner Build, Test, and Push / spanner-e2e-tests (push) Has been cancelled
Spanner Build, Test, and Push / deploy-spanner-dockerhub (push) Has been cancelled
docs: open api docs utoipa (#2023)
docs: open api docs utoipa
2026-02-06 17:05:36 -05:00

12 lines
353 B
Rust

// Simple binary to generate the OpenAPI spec without running Sync.
// Run with: cargo run --example generate_openapi_spec
use syncserver::server::ApiDoc;
use utoipa::OpenApi;
fn main() {
let openapi = ApiDoc::openapi();
let json = serde_json::to_string_pretty(&openapi).expect("Failed to serialize OpenAPI spec");
println!("{}", json);
}